4

我正在使用https://github.com/mapbox/react-native-mapbox-gl/blob/master/API.md#custom-styles将 mapbox 集成到我的 react-native 应用程序中,但我无法更改“ pitch" 不是默认的 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>
    );
4

0 回答 0