我正在使用react-native-map clustering的MapView以及react-native-maps的Marker和callout。我无法使用animateToRegion
,它提示我this.mapView.animateToRegion不是一个函数
<MapView
ref={map=>{mapView = map}}
provider='google'
clustering={true}
onClusterPress={this.onPressCluster}
region={this.state.region}
onRegionChange={this.onRegionChange}
onRegionChangeComplete={this.onRegionChangeComplete}
style={styles.map}
showsUserLocation={true}
followUserLocation={true}
zoomEnabled={true}
ScrollEnabled={true}
showsBuildings={true}
showsMyLocationButton={false}/>
mapView.root
返回 null,您可以告诉我您使用的 React Native Maps 版本是哪个吗? - PrimeTimeTranthis.mapView.animateToRegion(r, 2000);
。 - Rob Gleeson