Offline map in React Native Mapbox GL

2.9k Views Asked by At

How to properly manage rendering map when device is offline? Official documentation (https://github.com/mapbox/react-native-mapbox-gl/blob/master/API.md#offline) helped to get packs saved and being able to remove them, but trying to load component without network connection gives empty map. Mapbox.initializeOfflinePacks() is called in root component and offline packs may be seen and deleted from any point in app.

Other link suggested in documentation (https://www.mapbox.com/help/mobile-offline/) did not help.

Versions: React Native 0.46.4, React Native Mapbox GL 5.2.0

Edit: This was a bug in our app. Latitude and longitude inside bounds argument passed to method createPack were swapped so pack was correctly downloaded but contained a map of region that was far beyond visible area at high zoom level and, due to its small size, invisible at wide zoom.

0

There are 0 best solutions below