MapLibre Logo

Flutter MapLibre GL

Interactive, fully styleable vector maps on Android, iOS and Web, powered by open source MapLibre.
Vendor-neutral: host your own tiles or mix providers, no account or API key required to get started.

Pub Version Likes Pub Points Stars Melos

✨ Try it before you install: run the package live in your browser and read the full docs, no setup and no API keys.

Live demo    Documentation

πŸ–ΌοΈ What it looks like

Android, iOS and web
the same 3D map of Lower Manhattan on web, Android and iOS
Globe, on web Heatmaps
globe projection rendered by MapLibre GL JS earthquakes drawn as a heatmap, weighted by magnitude
Clustering Annotations
GeoJSON points clustered with live counts symbol markers with icons and labels

The demo runs the plugin in your browser, and every guide embeds an interactive map you can pan and click.

πŸš€ Quick start

flutter pub add maplibre_gl
import 'package:maplibre_gl/maplibre_gl.dart';

// Anywhere with bounded constraints, a Scaffold body for example:
MapLibreMap(
  initialCameraPosition: const CameraPosition(target: LatLng(0, 0), zoom: 2),
  styleString: 'https://demotiles.maplibre.org/style.json',
  onStyleLoadedCallback: () {
    // Add sources, layers and images here.
  },
);

Requires Flutter 3.44+ Β· Dart 3.12+ Β· JDK 21 for Android builds Β· Android 7.0 (API 24)+ Β· iOS 15.5+ Β· a browser with WebGL2 (Safari 15+).

Then head to the getting started guide for platform setup (location permissions on iOS/Android; web needs no index.html changes) and to learn how to add markers, layers, offline tiles and more.

Upgrading from 0.27? The migration guide lists what to check.

πŸ—ΊοΈ Feature support

Engines: maplibre-native (Android/iOS), maplibre-gl-js (Web). Only a subset of native SDK APIs is exposed, PRs to extend coverage are welcome.

Feature Android iOS Web
Style, Camera, Gesture βœ… βœ… βœ…
User Location βœ… βœ… βœ…
Annotations βœ… βœ… βœ…
All layer types (Symbol to Hillshade) βœ… βœ… βœ…
GeoJSON, vector, raster & PMTiles sources βœ… βœ… βœ…
Offline regions βœ… βœ… ❌
Feature state βœ… βœ… βœ…

See the full feature matrix for details.

Not supported: desktop targets (Windows, macOS, Linux), and Flutter widgets inside the map. The map is a platform view rendered by the native engines, so your widgets go over it in a Stack, not between its layers.

Example app Β· API reference Β· Changelog Β· Discussions Β· Issues Β· Slack (#maplibre-flutter)

🀝 Contributing

dart pub global activate melos
melos bootstrap

This is a melos workspace (maplibre_gl, maplibre_gl_web, maplibre_gl_platform_interface and the example app). Layer/source helpers are generated, don't edit them directly; run melos run generate && melos run format-all. See CONTRIBUTING.md before opening a PR, and the architecture docs for an overview.

This project is a fork of flutter-mapbox-gl. ❀️

πŸ’ Contributors

A huge thanks to everyone who has contributed to this project!

Contributors

Made with contrib.rocks.

πŸ“„ License

See LICENSE.

Libraries

maplibre_gl
This library contains the MapLibre GL plugin for Flutter.