nitaliano / react-native-mapbox-gl

A Mapbox GL react native module for creating custom maps
Other
2.16k stars 697 forks source link

Offline map not being used by MapView #1553

Closed atomheartother closed 5 years ago

atomheartother commented 5 years ago

Hello,

I'm hoping that this is due to me mis-using the OfflineManager, I'm using it pretty simply and it doesn't seem to work. This bug is on Android and iOS.

Behavior

Is this expected behavior, did I misunderstand what the OfflineManager does? In my head the expected behavior would be:

kristfal commented 5 years ago

Questions:

Which style are you using for offline download and map view (you'll declare the style twice)? Does it have the same behaviour if you view the map before you download the offline bundles? What happens if you restart the app after downloading the bundle?

atomheartother commented 5 years ago

Which style are you using for offline download and map view

Yeah, no, i'm an absolute idiot. This is what I get for not setting a single const for all my styleURLs... Sorry for the bother, I indeed had 2 different styleURLs.

kristfal commented 5 years ago

Done that myself, hence the question ;)

trankhacvy commented 5 years ago

@kristfal Do I need to download two packs if I use two modes (street and satellite) ? Do the createPack function has an option to download multiple packs in a same time ?

kristfal commented 5 years ago

@levi-ackerman, yes, you download a pack by specifying a style along with zoom and bounds. That given style is then downloaded, nothing else.

In your case, you’d need to download both street and satellite. You can run multiple downloads in parallel, so just start both at the same time for the same zoom and bounds.