React native 反应本机地图MapView.Circle

React native 反应本机地图MapView.Circle,react-native,geometry,zooming,react-native-maps,React Native,Geometry,Zooming,React Native Maps,我试图在缩放时获得相同大小的圆圈。我试着通过设置“比例”来实现这一点,但它也不起作用。我该怎么做? 有人能告诉我怎么做吗,也许举个例子 <MapView.Circle key = { (this.state.longitude + this.state.latitude).toString() } center = {{latitude: this.state.latitude,

我试图在缩放时获得相同大小的圆圈。我试着通过设置“比例”来实现这一点,但它也不起作用。我该怎么做? 有人能告诉我怎么做吗,也许举个例子

               <MapView.Circle
                    key = { (this.state.longitude + this.state.latitude).toString() }
                    center = {{latitude: this.state.latitude,
                        longitude: this.state.longitude} }
                    radius = { 100 }
                    strokeWidth = { 1 }
                    strokeColor = { '#1a66ff' }
                    fillColor = { '#1a66ff' }


                />


致以最诚挚的问候

一种方法是将当前地图区域保存到状态,这表示查看者看到的坐标域

onRegionChange(region) {
    // Update state
    this.setState({ mapRegion: region });
  }
  <MapView 
     onRegionChange={this.onRegionChange.bind(this)}
  />

一个友好的提醒:这很可能会被否决,因为这并不表明你已经做出了任何努力。你可能应该发布一些代码,包括到目前为止你已经尝试过的内容。现在,你的问题正好落在“要求教程”的旗帜下。如果你不知道你尝试了什么,人们就无法解释你错在哪里。
size = {radius / Math.sqrt(this.state.mapRegion.longitudeDelta*this.state.mapRegion.longitudeDelta + this.state.mapRegion.latitudeDelta*this.state.mapRegion.latitudeDelta)}