Google maps 反应本地地图<;圆圈/>;组件呈现黑屏时,谷歌是供应商

Google maps 反应本地地图<;圆圈/>;组件呈现黑屏时,谷歌是供应商,google-maps,react-native,react-native-ios,react-native-maps,Google Maps,React Native,React Native Ios,React Native Maps,React Native Maps组件呈现完全黑屏,然后应用程序崩溃,没有错误消息,所有API组件(如Marker、Polygon)工作正常 当我删除google作为提供程序(provider={'google'})并且地图使用本机IOS地图时,它工作正常并显示我的圆圈。完全糊涂了 <MapView provider = {'google'} style={styles.map} region={{ latitude: 51.5560, longitude: 0

React Native Maps组件呈现完全黑屏,然后应用程序崩溃,没有错误消息,所有API组件(如Marker、Polygon)工作正常

当我删除google作为提供程序(provider={'google'})并且地图使用本机IOS地图时,它工作正常并显示我的圆圈。完全糊涂了

<MapView
  provider = {'google'}
  style={styles.map}
  region={{
    latitude: 51.5560,
    longitude: 0.2795,
    latitudeDelta: 0.015,
    longitudeDelta: 0.0121,     
  }}
  showsUserLocation = {true}
  followsUserLocation = {true}
  showsPointsOfInterest = {true}
  maxZoomLevel = {13.3}

>

  {/* // This only works when the map uses the native IOS map and line 35 is removed (provider = {'google'}) */}
          <MapView.Circle 
            key = { 'test' }
            center = { {latitude: this.state.latitude, longitude: this.state.longitude }}
            radius = { 1000   }
            strokeWidth = { 1 }
            strokeColor = { '#1a66ff' }
            fillColor = { 'rgba(230,238,255,0.5)' }
                    />

</MapView>

{/*//这仅在映射使用本机IOS映射并且删除第35行时有效(provider={'google'})*/}

我希望看到我的地图上画的圆圈。当我删除google作为提供商时,它会工作,并且它在本机IOS地图上运行。

如果它是您自己创建的地图样式

导出常量Googlemapstyle=[…] 用法

从“Googlemapstyle的路径”导入{Googlemapstyle}
对于
iOS
,除了提供mapStyle外,还需要执行以下操作

import MapView,{PROVIDER_GOOGLE}来自“react native maps”
// ...

如果要获取所需的贴图样式值,请参见。

您好,我指的不是贴图样式。我想查看一个圆形覆盖图,当我删除Google作为提供商并使用本机IOS地图时,它会起作用。or组件不适用于我的谷歌地图是的,你的问题提出了圆圈的问题。但您的提供商正在制造一个问题。因此,设置一个像我的答案一样的提供程序,并尝试解决问题。提供程序={provider_GOOGLE}与提供程序={'GOOGLE'}相同,这并不能解决问题。对于iOS,您应该包括一个自定义地图样式,如我的答案所示。我添加了一个自定义地图样式,问题仍然存在。自定义地图样式允许我设置地图样式,我不需要自定义样式,我想根据纬度和经度覆盖一个圆。解决了!问题在于构建配置