react-native-mapbox-gl
react-native-mapbox-gl copied to clipboard
error in offlineManager.createPack(..) styleURL
I've saved style.json on documentsDir then trying to path this file to styleURL in offlineManager.createPack to create an offline pack. What did I miss?
Code:
await MapboxGL.offlineManager.createPack({
styleURL: `file://${dirs.DocumentDir}/offlineConfig.json`,
...config,
},
progressListener,
errorListener,
);
Error:
Error Domain=MGLErrorDomain Code=-1 "Response class is not NSHTTPURLResponse" UserInfo={NSLocalizedFailureReason=Response class is not NSHTTPURLResponse}
I saw comments from maintainers @nitaliano that we can use two types of styleURL:
- External resource (http://, https://)
- Interna resource - absolute path to file in the native file system.
What I did wrong?
This repo is no longer officially maintained. Join us over to https://github.com/react-native-mapbox-gl/maps for an actively maintained react-native mapbox library.