Interactive vector maps for Flutter on Android, iOS, macOS, Windows, Linux and
web, built on MapLibre. Show any MapLibre or Mapbox
compatible style, from any tile provider or your own server. maplibre needs
no API key of its own; keys and fees depend only on the tile provider you
choose. maplibre is a
hosted project
of the MapLibre organization.
- Six platforms, one API: Android, iOS, macOS, Windows, Linux and web, with the same gestures and behavior everywhere.
- Flutter first: maps render into a Flutter
Texture(an HTML element on web), so widgets over and around the map compose like any other widget. Annotations are declarative layers that you update withsetState(). - Fast interop: calls MapLibre through FFI (and maplibre-gl-js through JS interop on web) instead of platform channels, and many values, such as the camera and the style layers, can be read synchronously.
- The full style spec: typed style layers, sources and expressions, vector and raster tiles, PMTiles, MBTiles, MapLibre Tiles (MLT), hillshading, heatmaps and 3D extrusions.
- Offline maps: download regions or the tiles along a route.
- Batteries included: user location, compass, scale bar, attribution, zoom buttons, clustering, feature queries and events for taps, drags and hover.
import 'package:maplibre/maplibre.dart';
MapLibreMap(
options: MapOptions(
style: MapStyle.url('https://demotiles.maplibre.org/style.json'),
initCamera: .position(center: Geographic(lon: 9.17, lat: 47.68), zoom: 7),
),
layers: [
CircleLayer(
points: [Feature(geometry: Point(Geographic(lon: 9.17, lat: 47.68)))],
color: const .literal(Colors.blue),
radius: const .literal(12),
),
],
)See Installation and Platform setup for the steps each platform needs.
| Platform | Package | Rendering |
|---|---|---|
| Android | maplibre_native |
OpenGL ES 3.0 (default) or Vulkan |
| iOS | maplibre_native |
Metal |
| macOS | maplibre_native |
Metal |
| Windows | maplibre_native |
Vulkan, shared with Flutter via D3D11 |
| Linux | maplibre_native |
Vulkan, shared with Flutter via OpenGL |
| Web | maplibre_web |
WebGL 2 (maplibre-gl-js) |
maplibre_native uses the
C API of MapLibre Native
through the maplibre_native_ffi
binding. maplibre_web uses
maplibre-gl-js. You only add
maplibre to your app.
Globe View
|
Custom Styling
|
Pitch and Rotate
|
Raster Tiles
|
3D Building Outlines
|
Heatmaps
|
Polygons
|
Elevation
|
Lines
|
Circles
|
Markers
|
There are two Flutter packages for MapLibre. They take different approaches:
maplibre (this package) |
maplibre_gl |
|
|---|---|---|
| Principle | What can be done in Dart is done in Dart | What the MapLibre SDKs can do is done by the SDKs |
| Platforms | Android, iOS, macOS, Windows, Linux, web | Android, iOS, web |
| Interop | FFI, JS interop on web | Platform channels, JS interop on web |
| Map in Flutter | Texture, HTML element on web |
Platform view, HTML element on web |
| API | Declarative annotations and an imperative controller, synchronous where possible | Imperative controller, asynchronous |
The comparison covers other map packages as well.
All kinds of contributions are welcome. Thanks a lot if you consider to contribute in any way! There are different ways how you can help the development:
- 🌟 Give the project on GitHub a star and like it on pub.dev. This helps the package to grow!
- 🪴 Use the package in your project and share feedback.
- 🐛 Open bug reports in case you find any.
- 💡 If you need a specific feature, open a feature request. or post your idea as discussion.
- 💬 Use the invite link to chat with us on Slack in the
#flutter-maplibrechannel. - 📖 Enhance the package documentation.
- 💝 Sponsor MapLibre on GitHub Sponsors or Open Collective.










