flutter_map
Flutter's №1 non-commercially aimed map client: it's easy-to-use, versatile, vendor-free, fully cross-platform, and 100% pure-Flutter
Welcome to v8 🎉
If you're upgrading, find out What's New In v8?
If you're new here, welcome! Feel free to look around and experiment, and check out Installation when you're ready.
If you're looking for documentation for an older version, use the version selector. v7 documentation is still available.
Why choose flutter_map?
🗺️ No more vendor lock-in: better flexibility, quality, and price
We natively support any static tiles! Bring your own tiles from your own server, the user's device, a tile container, or another externally-operated tile server. Use any service, but always be free to change to get the best fit, quality, and price.
Still want to use those familiar maps? Consider great quality and better priced alternatives, or use the more mainstream Google Maps or Mapbox Maps with flutter_map.
🚀 Stress-free setup & easy-to-use
Migrating from a commercial library (such as Google Maps) has never been easier. No more complex platform-specific setup, no more buggy & limited platform views (we're 100% pure-Flutter), and no more lacking-documentation & support. Just setup a simple widget, grab a string from your tile server, and you're done! And, it'll work across all the platforms Flutter supports. Check out our Code Demo to see just how simple it is.
🧩 Customize and expand endlessly
Add interactive and highly customizable polygons, polylines, and markers (which support widget children) to your map easily and quickly. And because we're 100% Flutter, it's easy to add your own stuff on top without messing around in platform views. A huge community of developers maintain an ecosystem of plugins for you to supercharge flutter_map with.
👋 But don't just take it from us...
Hundreds of thousands of apps and users choose flutter_map for mapping in their Flutter app, making us Flutter's №1 non-commercially aimed map client on pub.dev. Check out some independent reviews, comparisons, and studies, and see who's using flutter_map right now: Showcase & Case Studies
Vector tile support
If you're looking for vector tiles, we don't currently support them natively. We only support raster tiles at the moment.
However, options are available, and the we and the community are actively exploring & developing future support!
Code Demo
Setting up a map is simpler than making your lunch-time coffee! It can be accomplished in just under 30 lines and a minute or two to install.
This code snippet demonstrates everything you need for a simple map (in under 30 lines!), but of course, FM is capable of much more than just this, and you could find yourself lost in the many options available and possibilities opened!
import 'package:flutter_map/flutter_map.dart';
import 'package:latlong2/latlong.dart';
@override
Widget build(BuildContext context) {
return FlutterMap(
options: MapOptions(
initialCenter: LatLng(51.509364, -0.128928), // Center the map over London
initialZoom: 9.2,
),
children: [
TileLayer( // Bring your own tiles
urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png', // For demonstration only
userAgentPackageName: 'com.example.app', // Add your app identifier
// And many more recommended properties!
),
RichAttributionWidget( // Include a stylish prebuilt attribution widget that meets all requirments
attributions: [
TextSourceAttribution(
'OpenStreetMap contributors',
onTap: () => launchUrl(Uri.parse('https://openstreetmap.org/copyright')), // (external)
),
// Also add images...
],
),
],
);
}
This map uses the OpenStreetMap public tile servers, which are NOT free to use by everyone. A setup such as this, especially in production, would not be compliant with its requirements.
Get Help
Not quite sure about something? No worries, we're here to help!
Check the FAQs below, and double check the documentation
Then, for bug reports & feature requests: check for previous issues, then ask in GitHub Issues
Then, for support & everything else: ask in flutter_map Discord server or GitHub Discussions
FAQs
We get quite a lot of similar questions, so please check if your question is here before you ask!
❔How Does It Work?Last updated
Was this helpful?