我正在开发一个在图像上呈现谷歌地图的应用程序,如下所示
<img alt="Google Maps (Scotland)" src="http://maps.google.com/staticmap?size=480x200&maptype=mobile\&markers=55.9368450758,-3.03604939504,reda|55.9454374538,-3.18124534297,redb&key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx">
map 没有得到渲染,当我右键单击图像源并单击 url 时,我收到以下消息
“Google Maps API 服务器拒绝了您的请求。此站点或 IP 无权使用此 API key 。”
我检查了 https://code.google.com/apis/console 上的 API 访问API key 似乎都是正确的。只是想知道如何修复站点和 IP 位?
在谷歌 API 控制台中查看下面的设置
最佳答案
确保除了“Google Maps API”之外还启用了“Static Maps API”服务。
关于google-maps - Google Maps API 服务器拒绝了您的请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19408066/