【问题标题】:Google Maps Directions API getting errorGoogle Maps Directions API 出现错误
【发布时间】:2018-04-24 14:29:08
【问题描述】:

我正在使用 react native maps 来显示两个位置之间的方向,为此我使用了 MapViewDirections,

我已经创建了 GOOGLE_MAPS_APIKEY 并添加到应用程序中,但我警告并且无法在地图中看到方向。这是代码

<MapViewDirections
        origin={origin}
        destination={destination}
        apikey={GOOGLE_MAPS_APIKEY}
        strokeWidth={3}
      strokeColor="hotpink"

  /> 

ERROR : MapViewDirections 错误:此 IP、站点或移动应用程序无权使用此 API 密钥。从 IP 地址 1.42.189.121 收到请求,引用为空

【问题讨论】:

    标签: google-maps react-native google-maps-api-2 react-native-ios react-native-maps


    【解决方案1】:

    将 API 中的密钥限制更改为无,如下所示:

    或者选择IP而不是none,需要添加你的IP地址。

    【讨论】:

      猜你喜欢
      • 2018-11-30
      • 1970-01-01
      • 2016-10-22
      • 2015-12-12
      • 1970-01-01
      • 2011-05-24
      • 2015-07-24
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多