josxha / flutter_map_plugins

The source code for all sorts of flutter_map plugins.
https://pub.dev/publishers/joscha-eckert.de/packages
28 stars 19 forks source link

[BUG] Example: Add layerMode: VectorTileLayerMode.vector #43

Closed eliabieri closed 1 month ago

eliabieri commented 1 month ago

Package

vector_map_tiles_pmtiles

Bug Description

In the example of vector_map_tiles_pmtiles there is no layerMode: VectorTileLayerMode.vector in the constructor of VectorTileLayer. Isn't this a bug?

Steps to Reproduce

  1. Go to example

Expected Results

VectorTileLayer(
        // the map theme
        theme: mapTheme,

        tileProviders: TileProviders({
          // the awaited vector tile provider
          'protomaps': tileProvider,
        }),
        layerMode: VectorTileLayerMode.vector,

        // disable the file cache when you change the PMTiles source
        // fileCacheTtl: Duration.zero,
      ),

Platforms

all

Upvote & Fund

Fund with Polar

josxha commented 1 month ago

Hi Elia, thanks for opening a bug report. Not sure why the property can't be found in your implementation but it should be still available.

https://github.com/greensopinion/flutter-vector-map-tiles/blob/f3fdbd21b8608dae7f431a54a2a8bdc4500e6c0d/lib/src/vector_tile_layer.dart#L107-L109

But you can remove it since it isn't required for the implementation.