react-native-mapbox-gl icon indicating copy to clipboard operation
react-native-mapbox-gl copied to clipboard

error in offlineManager.createPack(..) styleURL

Open alextorn opened this issue 5 years ago • 1 comments

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:

  1. External resource (http://, https://)
  2. Interna resource - absolute path to file in the native file system.

What I did wrong?

alextorn avatar Jan 20 '20 13:01 alextorn

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.

systemlevel avatar Jan 28 '20 17:01 systemlevel