maplibre_gl
0.28.0, released 2 weeks ago by maplibre.org
Native MapLibre maps for Android, iOS and Web with vector tiles, PMTiles, GeoJSON and offline support
What it does
Provides a MapLibreMap widget that renders interactive vector maps using the MapLibre native engines on mobile and MapLibre GL JS on the web. It supports custom styles, annotations, clustering, heatmaps, and feature state. Offline regions are available on mobile only.
AI-written summary of version 0.28.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a vendor‑neutral map that works on Android, iOS and Web without API keys
- You want to host your own tiles or mix providers
- You need advanced vector tile features like clustering, heatmaps or feature state
Skip it when
- You target desktop platforms (Windows, macOS, Linux)
- You need Flutter widgets inside the map layers
- You require offline support on the web
Strengths
- Full platform parity across Android, iOS and Web
- Open source, no API key required
- Supports PMTiles, GeoJSON, clustering, heatmaps and feature state
- Built on MapLibre native engines for high performance
Weaknesses
- No desktop support
- Map widgets cannot be placed inside the map layers
- Requires native setup and permissions for location
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 4
Add package, set minimum Flutter/Dart versions, configure Android API 24+, iOS 15.5+, enable Swift Package Manager for iOS, add location permissions on Android/iOS, no index.html changes for web
import 'package:maplibre_gl/maplibre_gl.dart';
MapLibreMap(
initialCameraPosition: const CameraPosition(target: LatLng(0, 0), zoom: 2),
styleString: 'https://demotiles.maplibre.org/style.json',
onStyleLoadedCallback: () {
// Add sources, layers and images here.
},
);Alternatives
Packages that do the same job and could replace maplibre_gl.
- google_maps_flutter
Official Google Maps SDK with extensive platform support and built‑in widgets
90Compare - flutter_map
Open source Leaflet‑based map with plugin architecture and desktop support
90Compare
Works with
Packages commonly used together with maplibre_gl: ones it builds on, ones built on it, and its own family.