【问题标题】:ERROR: Google Maps API error错误:谷歌地图 API 错误
【发布时间】:2016-11-24 13:23:19
【问题描述】:

我有一个带别名的 Drupal 服务器,它不包含 Google Maps API 密钥。当我访问 A.com 时,它显示 Google Maps API 警告但没有错误,因此显示 gmap。但是当我访问 A.com 的别名 B.com 时,它显示 Google Maps API 错误和警告,因此不显示 gmap。想知道如何消除此错误,以便地图可以显示在 B.com 上。

【问题讨论】:

    标签: api google-maps google-maps-api-3 runtime-error


    【解决方案1】:

    恐怕唯一的选择是修补 Drupal 模块并在加载 Maps JavaScript API 的脚本标记中包含浏览器 API 密钥。

    如您所见,Google 在 2016 年 6 月 22 日更改了政策,现在需要 API 密钥。

    http://googlegeodevelopers.blogspot.com.es/2016/06/building-for-scale-updates-to-google.html

    显然,您的 A.com 域在 2016 年 6 月 22 日之前就已为人所知,因此 Google 将其“祖父化”了,您无需密钥即可使用它,但 B.com 域是新域,Google 并没有“祖父化”它。

    【讨论】:

      猜你喜欢
      • 2016-05-09
      • 2016-10-25
      • 1970-01-01
      • 2016-11-06
      • 2013-02-15
      • 2018-02-20
      • 2017-05-04
      • 1970-01-01
      相关资源
      最近更新 更多