Closed netvandal closed 8 months ago
Hi @netvandal, thanks for bringing some attention to this.
- is this the expected look?
No indeed is is not. After some testing I'm still not sure what causes this bug. Since vector_map_tiles_pmtiles
is more or less just the binding between vector_map_tiles
and pmtiles
it's likely that the bug might be hidden in one of these packages.
One important thing: The VectorTileLayer caches it's rendered tiles when using layerMode: VectorTileLayerMode.raster,
which is the default. You can either use layerMode: VectorTileLayerMode.vector
or disable the caches:
VectorTileLayer(
theme: _style,
// disable cache while testing
fileCacheTtl: Duration.zero,
memoryTileCacheMaxSize: 0,
memoryTileDataCacheMaxSize: 0,
fileCacheMaximumSizeInBytes: 0,
textCacheMaxSize: 0,
- Have you any hint on how to improve it (I'll be happy to help if you give me a starting point)
Thanks, I'd glad to accept any help. vector_map_tiles
supports the rendering of more details (see the example project and screenshots here). It could be that pmtiles mvt has some other format than the has some other pbf tiles that come from a tile provider like Mapbox or StadiaMaps? ...although I can only guess at the moment.
- Can be the style.json here:
I tried with the protomaps style.json but it didn't work either.
Seems a "Theme" problem. Starting from this: https://github.com/greensopinion/flutter-vector-map-tiles-examples/blob/main/lib/examples/light_custom_theme.dart and from this: https://github.com/greensopinion/dart-vector-tile-renderer/blob/3930bf8b0cd31105ee80a7d5b39790644130aef2/lib/src/themes/light_theme.dart#L4
And then analyzing the tiles with this tool: https://protomaps.github.io/PMTiles/?url=https%3A%2F%2Fbuild.protomaps.com%2F20240207.pmtiles#map=0.93/0/0 I can spot some difference in the layer naming. Trying to make a custom theme seems to work (at least changing some of the style ), and I, for example, be able to display buildings . I'll try to come up with something usable.
Bingo!
I'll do a pull request soon :)
Well done! Looking good so far.
Hi There, Can you give me any hint or suggestion on how to work and improve the rendering of the Map. Testing the sample app I can get it working but seems that the vector_map_tiles_pmtiles map is quite basic. Using ProvidedThemes.lightTheme() render like this:
I have some questions: 1) is this the expected look? 2) Have you any hint on how to improve it (I'll be happy to help if you give me a starting point) 3) Can be the style.json here: https://maps.protomaps.com/#map=7.99/45.234/10.21&theme=light&renderer=maplibregl&tiles=https://build.protomaps.com/20240206.pmtiles be of any help? Thankyou very much for your work.