谷歌地图API问题。无需使用API​​密钥 [英] Google Map API Issue. Using without API key

查看:150
本文介绍了谷歌地图API问题。无需使用API​​密钥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的谷歌的Map实现工作正常时,突然警报当时正在迅速由谷歌通知,以谷歌的地图是在我们的网站停用任何访问者,因为它没有正确的域引用或因关键是错误的;该相同的密钥在我们的子域,我们用发展的目的之一,做工精细,所以我们pretty确保问题不依赖于我们的终点。我们也双重检查谷歌的开发者控制台上的设置和一切都设置正确。

"Our Google's MAP implementation was working fine when suddenly an alert was being prompt by Google informing to any visitor that Google's MAP was deactivated in our site because it didn't have the correct domain references or because the key was wrong; the same key was working fine in one of our sub-domains, which we use for development purposes, so we were pretty sure that the issue didn't rely on our end. We also double checked the settings on Google's developers console and everything is setup properly.

最后,我们移除了API调用键暂时,直到我们找到一个解决方案;什么是不包括关键的后果,你可以给什么建议,我们来解决这个问题?

At the end we removed the key from the API call temporarily until we find a solution; what are the consequences of not including the key and what recommendations could you give us to solve this issue?

我们也使用谷歌的网页速度的技术。

We are also using Google's Page Speed technology.

推荐答案

有一件事我想是要确保在谷歌开发者控制台中显示的Referer的模式已足够一般化,例如 *。mysite.com / * ,而不是 mysite.com

One thing I tried was to make sure that the Referer patterns shown in the Google Developers Console were sufficiently generalised, e.g. *.mysite.com/* rather than mysite.com

这显然有助于但进一步的测试是在Windows上的Safari(5.1.7)和Firefox(29.0.1)几乎总是显示警报不一致。相反,它很少在Safari上显示iOS上。

This apparently helped but further testing was inconsistent with the alert shown almost always on Windows Safari (5.1.7) and Firefox (29.0.1). In contrast, it was rarely shown on Safari on iOS.

由于我的web应用程序是不太可能了一个月20000的要求,我决定放弃的关键和使用
<脚本SRC =htt​​p://maps.googleapis.com/maps/api/js?sensor=false>< / SCRIPT>

As my web app is unlikely to make 20000 requests a month, I decided to ditch the key and use <script src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>

到目前为止,这没有任何明显问题的工作。

So far, this has worked without any apparent issues.

这篇关于谷歌地图API问题。无需使用API​​密钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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