NetworkVectorTileProvider constructor

NetworkVectorTileProvider({
  1. required String urlTemplate,
  2. TileProviderType type = TileProviderType.vector,
  3. Map<String, String>? httpHeaders,
  4. int maximumZoom = 16,
  5. int minimumZoom = 1,
})

urlTemplate the URL template, e.g. 'https://tiles.stadiamaps.com/data/openmaptiles/{z}/{x}/{y}.pbf?api_key=$apiKey' httpHeaders HTTP headers to include in requests, suitable for passing Authentication header instead of an api_key in the URL template maximumZoom the maximum zoom supported by the tile provider, not to be confused with the maximum zoom of the map widget. The map widget will automatically use vector tiles from lower zoom levels once the maximum supported by this provider is reached.

Implementation

NetworkVectorTileProvider(
    {required String urlTemplate,
    this.type = TileProviderType.vector,
    this.httpHeaders,
    this.maximumZoom = 16,
    this.minimumZoom = 1})
    : _urlProvider = _UrlProvider(urlTemplate);