Skip to content
pubscout

vector_map_tiles

8.0.0, released 2 years ago by greensopinion.com

A flutter_map plugin that enables the use of vector tiles.

$ flutter pub add vector_map_tiles
Source repository

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.

Works with

Packages commonly used together with vector_map_tiles: ones it builds on, ones built on it, and its own family.