何时需要 Google Maps API 密钥? [英] When is a Google Maps API key required?

查看:32
本文介绍了何时需要 Google Maps API 密钥?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近 Google 更改了使用 API 密钥的政策.您现在应该不再需要 API 密钥来将 Google 地图放置在您的网站上.

Recently Google changed it's policy on the use API keys. You're now supposed to no longer need an API key to place Google Maps on your website.

这工作得很好.但是现在我在我的本地主机上运行了这张地图(没有 API 密钥),它工作正常.但是一旦我将它放到网上,我就会收到一个弹出窗口,说我需要另一个 API 密钥.在该网站的另一个页面上,谷歌地图确实有效.可能与不起作用的地图上有很多(30+)标记有关吗?

And this worked perfectly. But now I have this map (without API key) running on my localhost, which works fine. But as soon as I place it online, I get a popup saying that I need another API key. And on another page on that website, Google Maps does work. Could it maybe have something to do with that the map that doesn't work have a lot (30+) of markers on it?

实际上,使用 API 密钥对我来说并不是一个很好的解决方案,因为这是许多网站上使用的 Wordpress 插件的一部分.

Actually using an API key wouldn't be a very nice solution to me, as this is part of a Wordpress plugin used on many websites.

推荐答案

听起来您正在运行 v2~ 是时候升级了,或者获取要在其上运行的域的密钥:Google Maps V2 API 密钥请求

Sounds like you're running v2~ time to upgrade, or get a key for the domain you want to run it on: Google Maps V2 API Key Request

这篇关于何时需要 Google Maps API 密钥?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆