【发布时间】:2018-08-02 23:29:09
【问题描述】:
我目前正在尝试将我在 Mapbox Studio 中创建的自定义地图实现到我的 RN 应用程序中。代码如下所示:
render() {
const {StyleURL} = 'url';
const {mapLight} = 'url';
return(
<View style={styles.container}>
<Mapbox.MapView
accessToken={'token'}
styleURL= {mapLight}
zoomLevel={16}
centerCoordinate={[this.state.xCoord, this.state.yCoord]}
style={{flex: 1}}
showUserLocation={true}
pitchEnabled={false}>
</Mapbox.MapView>
</View>
)
}
我确实在我的应用程序上实现了地图视图,但是,它不是我在 Mapbox Studio 中设计的地图。是的,我使用了正确的样式 url,是的,它是正确的访问令牌。关于为什么会这样的任何帮助/解释?谢谢,在这一点上,我真的很感激任何见解。
【问题讨论】:
标签: react-native mapbox mapbox-gl-js mapbox-android