我正在实现谷歌地图,将地址传递给谷歌地图 api 以获取 map 上的当前位置,但它在浏览器控制台中显示以下错误,
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
我还想在服务器端使用谷歌地图 API,根据提供的地址获取纬度和经度。 我是新来实现谷歌地图 API 的,非常感谢任何帮助。
最佳答案
您应该从 https://developers.google.com/maps/ 注册到 google map api .
选择适合您的特定 API
点击“获取 key ”
然后创建一个新项目
激活 Google Maps JavaScript API
复制您的 key 并将其放入您在代码中使用的 api url
如果 API 没有响应,您需要添加您正在使用的域,然后
完成!
关于javascript - 谷歌地图显示错误 Api 项目未授权,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38496992/