flutter_map_mbtiles
1.1.0, released 3 weeks ago by joscha-eckert.de
Offline raster tile provider for flutter_map using MBTiles
What it does
Provides a TileProvider that reads raster tiles (jpg, png, webp) from an MBTiles SQLite database. It can be used with flutter_map to display fully offline maps.
AI-written summary of version 1.1.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need offline map support with raster tiles
- You already use flutter_map and want to avoid network requests
- Your tile data is stored in an MBTiles file
Skip it when
- You need vector tiles (use vector_map_tiles_mbtiles)
- You target web platform (no SQLite support)
Strengths
- Zero extra setup on supported platforms
- Supports multiple raster formats
- Easy integration with flutter_map
Weaknesses
- Web not supported
- Requires file system access and permissions
- No vector tile support
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
Add flutter_map_mbtiles to pubspec, provide path to .mbtiles file, call dispose() when done
final tileProvider = MbTilesTileProvider.fromPath(path: 'path/to/file.mbtiles');
@override
Widget build(BuildContext context) {
return FlutterMap(
options: const MapOptions(),
children: [
TileLayer(tileProvider: tileProvider),
],
);
}
@override
void dispose() {
tileProvider.dispose();
super.dispose();
}Alternatives
Packages that do the same job and could replace flutter_map_mbtiles.
- maplibre_gl
Native MapLibre maps for Android, iOS and Web with vector tiles, PMTiles, GeoJSON and offline support
91Compare - google_maps_flutter_web
Web platform implementation of google_maps_flutter.
88Compare - mapbox_maps_flutter
Official Mapbox Maps SDK for Flutter to render interactive vector maps.
92Compare - maplibre
Performant vector maps for Flutter supporting Mapbox Vector Tiles across all six platforms.
90Compare
Works with
Packages commonly used together with flutter_map_mbtiles: ones it builds on, ones built on it, and its own family.
- flutter_mapflutter_map_mbtiles depends on itPure‑Flutter map client with tile loading, markers, and gestures
- mbtilesflutter_map_mbtiles depends on itRead and write Mapbox MBTiles v1.3 files with support for vector and raster tiles.
- flutter_map_cacheSame familyA slim caching plugin for flutter_map tile layers supporting multiple storage backends.
- flutter_map_compassSame familyA simple compass widget for flutter_map displaying rotation and resetting it when tapped.
- flutter_map_pmtilesSame familyPMTiles tile provider for flutter_map supporting local or hosted files.
- flutter_map_maplibreSame familyMapbox Vector Tiles support for flutter_map powered by native MapLibre SDKs.
- vector_map_tiles_mbtilesSame familyMapbox MBTiles vector tile provider for flutter_map for offline maps