如何使用Mapbox gl设置初始音高?

时间:2017-05-21 00:14:58

标签: react-native mapbox mapbox-gl-js mapbox-gl

我正在使用https://github.com/mapbox/react-native-mapbox-gl/blob/master/API.md#custom-styles将mapbox集成到我的反应原生应用中,而我无法更改"音高"不是默认值0。

以下是我所拥有的:

     class MapExample extends Component {
      state = {
        pitch: 50,
        zoom: 18,
        userTrackingMode: Mapbox.userTrackingMode.follow
      };

render() {
    StatusBar.setHidden(true);
    return (
      <View style={styles.container}>
        <MapView
          ref={map => { this._map = map; }}
          style={styles.map}
          pitch={this.state.pitch}
          initialZoomLevel={this.state.zoom}
          styleURL={'mapbox://styles/ctsygiel/cj2wllwes001p2rpmb1yup02a'}
        />
      </View>
    );

0 个答案:

没有答案