React Native MapView 使用相机标题旋转地图

use*_*370 5 android dictionary ios reactjs react-native

我正在尝试在 React Native 的<MapView> 中旋转地图,但无法找到有关如何根据相机的标题旋转地图的说明。该教程指出:

当此属性设置为 true 并且有效的相机与地图相关联时,相机的航向角用于围绕其中心点旋转地图平面。

所以我来了:

<MapView
          style={styles.map}
          onRegionChange={this._onRegionChange}
          onRegionChangeComplete={this._onRegionChangeComplete}
          region={this.state.mapRegion}
          annotations={this.state.annotations}
          rotateEnabled={true}
Run Code Online (Sandbox Code Playgroud)

但是没有解释相机如何与地图相关联。

任何人都可以帮助解决这个问题吗?

spa*_*tak -2

为此使用相机属性。
您可以阅读文档以获取更多信息。