Closed ABertaud closed 1 week ago
Create custom style on mapbox studio. Make it standard, and publish it as public. Here's the preview.
From share button retrieve the styleURL and use it directly into your component.
import React from 'react'; import { StyleSheet, View } from 'react-native'; import Mapbox from '@rnmapbox/maps'; Mapbox.setAccessToken('<YOUR_ACCESSTOKEN>'); const App = () => { return ( <View style={styles.page}> <View style={styles.container}> <Mapbox.MapView style={styles.map} styleURL="<STYLE_URL>" /> </View> </View> ); } export default App; const styles = StyleSheet.create({ page: { flex: 1, justifyContent: 'center', alignItems: 'center', }, container: { height: 300, width: 300, }, map: { flex: 1 } });
Now i'm encountering a black screen. Note two things:
StyleURL.Light
Really looking forward some help!
Solved by using mapbox v11 instead of default v10.
Environment
Steps to reproduce
Create custom style on mapbox studio. Make it standard, and publish it as public. Here's the preview.
From share button retrieve the styleURL and use it directly into your component.
Now i'm encountering a black screen. Note two things:
StyleURL.Light
, this do not display black screen anymore.Really looking forward some help!