vector_map_tiles_pmtiles 1.0.1 vector_map_tiles_pmtiles: ^1.0.1 copied to clipboard
PMTiles tile provider for vector_map_tiles (flutter_map vector tiles). It uses HTTP Range Requests to request tiles from a single local or hosted file.
Basic usage #
// initiate your tile provider
final Future<
PmTilesVectorTileProvider> _futureTileProvider = PmTilesVectorTileProvider
.fromSource('eitherAnUrlOrFileSystemPath');
@override
Widget build(BuildContext context) {
return FlutterMap(
options: MapOptions(),
children: [
TileLayer(
urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
// use your awaited PmTilesVectorTileProvider
tileProvider: tileProvider,
),
],
);
}
Need more information? #
- Read the README.md
- Check out the combined example app that showcases this and other flutter_map packages.