gpt4 book ai didi

google-maps - 如何在本地主机上使用谷歌地图简单 api

转载 作者:行者123 更新时间:2023-12-03 12:06:34 25 4
gpt4 key购买 nike

我已请求在我的网站上嵌入谷歌地图的链接

https://developers.google.com/maps/documentation/embed/start

并已授权所有知道该链接的人使用它
Referers: Any referer allowed
https://code.google.com/apis/console/

但我仍然收到一个
The Google Maps API server rejected your request. This API project is not authorized 
to use this API. Please ensure that this API is activated in the APIs Console:
Learn more: https://code.google.com/apis/console

还有其他方法可以使用嵌入式谷歌地图在本地测试我的网站吗?

编辑:
他们说:
Easy embedding

Google Maps Embed API maps are easy to add to your webpage—just set the URL
you build as the value of an iframe's src attribute. Control the size of the
map with the iframe's height and width attributes. No JavaScript required.

但我仍然无法访问链接。

最佳答案

问题是他们的“快速启动”已经过时了。

https://developers.google.com/maps/documentation/embed/start

它说您应该只向他们提供您的 API key ,但问题是同一网站有一个新版本,他们没有从他们的指南中获得链接,但您可以从其他地方获得链接(我在“计费”)

新服务称为 Cloud Console,我在那里找到了 API 开/关按钮。

https://console.developers.google.com/project/ ...

您必须启用“Static Maps API”、“Google Maps API”和“Google Maps Embed API”,并确保您的链接在 iframe div 中

关于google-maps - 如何在本地主机上使用谷歌地图简单 api,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26694049/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com