Mapping package for Flutter, based off of 'leaflet.js'. Simple and easy to learn, yet completely customizable and configurable, it's the best choice for mapping in your Flutter app.
This documentation applies to v4 only!
Use the version selector in the top left to choose documentation suitable for your version.
Setting up an interactive and compliant map is simpler than making your lunch-time coffee! It can be accomplished in just over 20 lines and a minute or two to install.
This code snippet demonstrates everything you need for a simple map (in just over 20 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!
Not quite sure about something? No problem. Please get in touch via any of these methods, and we'll be with you as soon as possible. Please remember that we are volunteers, so we cannot guarantee (fast) support.
For bug reports & feature requests:
For general support & everything else:
Ease of use/setup We don't require any API keys or platform specific setup (other than enabling the Internet permission!), so you can get started quicker, and make changes without fear of breaking your release application.
Support quality and frequency Most questions are answered and resolved within 12-24 hours, thanks to our dedicated maintainers and community.
However, alternatives may win on:
Performance*
flutter_map's performance is very adequate for the vast majority of applications, and many big businesses use FM to provide maps in their Flutter app.
However, if you're using high-thousands of Markers or Polygons and such like, alternatives may win, purely because they use platform views and GL, and so can do calculations outside of Dart.
... and that's pretty much it 😉
Supports any* map style
We natively support any static raster tile server, including from a web server or even from the local file system or app asset store. No more vendor lock-in!
Stress-free setup and use
Migrating from a commercial library such as Google Maps has never been easier! No more complex platform-specific setup, no more API keys: just add a widget and you're done.
Wide ecosystem of plugins
In the unlikely event that flutter_map doesn't natively contain something you need, just check to see if there's a community maintained plugin that does what you need!
Add other map features
Add polygons, polylines, and markers/pins to your map easily and quickly. Markers support displaying any widget you might want.
@override
Widget build(BuildContext context) {
return FlutterMap(
options: MapOptions(
center: LatLng(51.509364, -0.128928),
zoom: 9.2,
),
children: [
TileLayer(
urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
userAgentPackageName: 'com.example.app',
),
],
nonRotatedChildren: [
RichAttributionWidget(
attributions: [
TextSourceAttribution(
'OpenStreetMap contributors',
onTap: () => launchUrl(Uri.parse('https://openstreetmap.org/copyright')),
),
],
),
],
);
}