vector_map_tiles
8.0.0, released 2 years ago by greensopinion.com
A flutter_map plugin that enables the use of vector tiles.
What it does
Loads vector tiles from sources like Mapbox or Stadia Maps and renders them as a layer on top of a flutter_map instance. It supports themes, sprites, custom tile providers, and alternate file formats through community packages.
AI-written summary of version 8.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are using flutter_map and need to render vector tiles instead of raster tiles
- You want custom styling or dynamic themes for your maps from providers like Mapbox or Stadia Maps
Skip it when
- You are not using flutter_map
- You prefer standard raster tile layers without vector styling features
Strengths
- Integrates seamlessly with flutter_map
- Supports multiple popular map styles and providers
- Improves performance by rendering vector tiles to raster images or maintaining layer modes
Weaknesses
- Requires careful matching of themes and tile providers
- May require attribution depending on the tile data provider used
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 7
Requires adding the dependency and configuring a StyleReader with your API key along with a VectorTileLayer in your FlutterMap children.
Future<Style> _readStyle() => StyleReader(uri: 'https://tiles.stadiamaps.com/styles/osm_bright.json?api_key={key}', apiKey: stadiaMapsApiKey).read();
FlutterMap(
options: MapOptions(center: LatLng(49.246292, -123.116226), zoom: 10),
children: [
VectorTileLayer(theme: style.theme, sprites: style.sprites, tileProviders: style.providers),
],
)Alternatives
Packages that do the same job and could replace vector_map_tiles.
- google_maps_flutter
If you prefer native Google Maps instead of flutter_map and vector tiles.
90Compare
Works with
Packages commonly used together with vector_map_tiles: ones it builds on, ones built on it, and its own family.
- asyncvector_map_tiles depends on itUtility classes and helpers that extend Dart's async library.
- path_providervector_map_tiles depends on itProvides Flutter APIs to locate common filesystem directories on Android, iOS, macOS, Linux and Windows.
- latlong2vector_map_tiles depends on itLightweight Dart library for latitude/longitude calculations.
- flutter_mapvector_map_tiles depends on itPure‑Flutter map client with tile loading, markers, and gestures
- vector_tile_renderervector_map_tiles depends on itVector tile renderer for creating map tile images or writing to a canvas.
- vector_map_tiles_pmtilesBuilt on vector_map_tilesPMTiles tile provider for vector_map_tiles using HTTP Range Requests.
- vector_map_tiles_mbtilesBuilt on vector_map_tilesMapbox MBTiles vector tile provider for flutter_map for offline maps