vector_map_tiles_pmtiles 1.0.0 copy "vector_map_tiles_pmtiles: ^1.0.0" to clipboard
vector_map_tiles_pmtiles: ^1.0.0 copied to clipboard

PMTiles for vector_map_files / flutter_map

example/example.md

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? #