【问题标题】:Google maps showing error Api project not authorised谷歌地图显示错误 Api 项目未授权
【发布时间】:2016-11-24 14:51:07
【问题描述】:

我正在实施谷歌地图,我将地址传递给谷歌地图 api 以获取地图上的当前位置,但它在浏览器控制台中显示以下错误,

 This API project is not authorized to use this API. Please ensure this API is activated in the Google Developers Console: https://console.developers.google.com/apis/api/geocoding_backend?project=_ For more information on authentication and Google Maps Javascript API services please see: https://developers.google.com/maps/documentation/javascript/get-api-key

我还想在服务器端使用 google maps api,根据提供的地址获取纬度和经度。 我是实施 google maps api 的新手,非常感谢任何帮助。

【问题讨论】:

标签: javascript php google-maps geolocation


【解决方案1】:

你应该从https://developers.google.com/maps/注册到google map api。

为您选择特定的 api

点击获取密钥

然后新建一个项目

激活 Google Maps JavaScript API

复制您的密钥并将其放入您在代码中使用的 api url 中

如果 api 没有响应,您需要添加一个您正在处理的域,然后

完成!

【讨论】:

  • 如何激活 Google Maps JavaScript API
  • 您可以为您选择的每个api找到不同的代码sn-ps,然后您可以通过更改,添加或删除一些js属性来自定义它。
猜你喜欢
  • 2015-02-13
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-05-09
  • 2011-08-11
  • 2013-07-05
  • 2016-05-11
  • 2013-11-24
相关资源
最近更新 更多