I am trying to rotate a map in React Native's <MapView> but haven't been able to find a description on how to rotate a map according to the heading of the camera. The tutorial states:
When this property is set to true and a valid camera is associated with the map, the camera’s heading angle is used to rotate the plane of the map around its center point.
So I came as far as:
<MapView
style={styles.map}
onRegionChange={this._onRegionChange}
onRegionChangeComplete={this._onRegionChangeComplete}
region={this.state.mapRegion}
annotations={this.state.annotations}
rotateEnabled={true}
But there is no explanation on how a camera is associated with the map.
Can anyone help with this issue please?