React-native-mapbox-gl: How to load offline Pack to MapView

Created on 10 Jul 2018  路  3Comments  路  Source: nitaliano/react-native-mapbox-gl

Hi, I am downloading a Region in the splash screen of my app. How can I load the downloaded pack to the map. This is the code I use for downloading the pack

await MapboxGL.offlineManager.createPack({ name: 'spain', styleURL: Mapbox.StyleURL.Light, minZoom: 14, maxZoom: 20, bounds: [[NE_LON, NE_LAT], [SW_LON, SW_LAT]] }, progressListener, errorListener)

Most helpful comment

@yaduc you don't need to load the pack

  • The tiles get saved to the file system
  • They are referenced from a local database

so once you download the pack 100% it will just work in offline mode. LMK if it doesn't work! Closing this out for now

All 3 comments

@nitaliano

@yaduc you don't need to load the pack

  • The tiles get saved to the file system
  • They are referenced from a local database

so once you download the pack 100% it will just work in offline mode. LMK if it doesn't work! Closing this out for now

If I have downloaded several packs, which one will be used?
@nitaliano

Was this page helpful?
0 / 5 - 0 ratings

Related issues

VentsislavDinev picture VentsislavDinev  路  3Comments

digitaldavenyc picture digitaldavenyc  路  4Comments

EugenePisotsky picture EugenePisotsky  路  4Comments

vyankat70war picture vyankat70war  路  3Comments

olofd picture olofd  路  3Comments