Closed mutablestudio closed 5 years ago
Try building from master. It contains a few fixes for event propagation for expo based projects that are not yet on NPM.
thanks @kristfal - we switched to master and have a new issue #1554
Closing in favor of #1554.
We are using a custom style URL like so:
mapbox://styles/userXXX/lrfi997
On Android this code will never hit the console statement and does not throw inside a try...catch:
export const getMapSnapShot = async (lng, lat) => { const uri = await Mapbox.snapshotManager.takeSnap({ centerCoordinate: [lng, lat], width: wp(100), height: hp(100), zoomLevel: 16, styleURL: "mapbox://styles/userXXX/lrfi997", writeToDisk: true, }) console.log("uri ----------") return uri }
The same code works on iOS so we know the style URL is valid. When we selected Android in our mapbox account the styleURL and access token were the same as for iOS.
If I change the styleURL to
Mapbox.StyleURL.Dark
it works. Is there updated guidelines or docs for how the styleURL should be used?This is a detached Expo project using mapbox 6.1.3
"@mapbox/react-native-mapbox-gl": "^6.1.3", "expokit": "32.0.5", "react": "16.5.0", "react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",