小编Dik*_*eep的帖子

如何在反应原生地图中获取边界

我想检查地图的边界,以便我可以根据边界应用聚类。 var bounds = map.getBounds(); var ne = bounds.getNorthEast(); // LatLng of the north-east corner var sw = bounds.getSouthWest(); // LatLng of the south-west corner

javascript react-native

6
推荐指数
1
解决办法
3598
查看次数

如何在反应本机地图中使用animateToRegion函数?

我正在使用React-native地图群集的MapView和Marker和react-native-maps的标注。我无法使用animateToRegion。它告诉我this.mapView.animateToRegion is not a function

 <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}/>
Run Code Online (Sandbox Code Playgroud)

react-native

5
推荐指数
1
解决办法
5131
查看次数

标签 统计

react-native ×2

javascript ×1