mapbox-maps-flutter icon indicating copy to clipboard operation
mapbox-maps-flutter copied to clipboard

Offline Map Functionality Issue

Open mateusztylman opened this issue 1 year ago • 4 comments

Hi there!

I implemented the offline map functionality that you added in the latest update. However, I encountered a problem where the map still doesn’t display even after downloading the point. I went through your entire example and couldn’t find anything that I might have missed. I decided to test your example as well, and it doesn’t work either.

What did I do?

I added an additional button to the example that centers the map on a point that I had previously downloaded. This way, the map doesn’t download the area automatically and doesn’t use the cache.

Could you please check this?

mateusztylman avatar Jul 26 '24 12:07 mateusztylman

Hi @mateusztylman, thank you for raising this, this is most likely due to the TileStore in the example is created at custom path, and we did not set this tileStore instance to MapboxMapsOptions.tileStore(not yet exposed API). Using default TileStore should work just fine. I have fixed this in https://github.com/mapbox/mapbox-maps-flutter/pull/640/commits/1933f79ca8532a93a2100add3c7d42e694a1bba7 by setting this tileStore so that the Map objects will you this and not the one at default path.

maios avatar Aug 07 '24 12:08 maios

@maios i tried your example, downloaded style and region..but it shows black and still doesnt load

vijinhps avatar Aug 11 '24 19:08 vijinhps

Offline maps shows black might be related to one issue with TileStore that we are investigating https://github.com/mapbox/mapbox-maps-ios/issues/2123 I will keep you updated on this

maios avatar Aug 13 '24 10:08 maios

@vijinhps can you try again with our latest release v2.2.1? We have made some fixes to offline, where we make sure that Map objects are using the same TileStore that is used to download offline regions, and that default pixelRatio is used in TilesetDescriptorOptions - which is crucial for raster tiles.

maios avatar Aug 29 '24 07:08 maios