Google Maps API - 在域上停用 [英] Google Maps API - disabled on domain

查看:90
本文介绍了Google Maps API - 在域上停用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当页面加载时,我将这条消息作为javascript提醒:
Google禁止在此应用程序中使用Maps API。有关详情,请参阅服务条款:http://www.google.com/intl/zh-CN_US/help/terms_maps.html。



一切正常,直到今天。谷歌网站管理员工具没有告诉我任何事情。



我的问题是我可以找到更多的信息为什么exacly这个网页已被禁止/阻止。 (根据有很多可能的原因)



如何解除此问题?谁或在哪里发送请求?我的web应用程序发生了同样的错误,我们通过更新我们的链接修复了它。 到Google Maps API文件。



以前我们使用的是位于 http://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&sensor=SET_TO_TRUE_OR_FALSE



当我们使用直接链接时,这个特定错误消失了。



编辑:即使您直接链接到Google的js文件,也请确保您的应用程序未使用旧的本地缓存版本。



不工作版本:

 < script type =text / javascriptsrc =local_google_maps_api.js> 

工作版本:

 < script type =text / javascriptsrc =http://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&sensor=SET_TO_TRUE_OR_FALSE> 

Google可能会开始使用旧版地址版本无效化Google API v3调用。 Javascript代码文件主要在API IP地址调用


中有所不同

When page loads i get the message as javascript alert: Google has disabled use of the Maps API for this application. See the Terms of Service for more information: http://www.google.com/intl/en-US_US/help/terms_maps.html.

Everything working fine till today. Google webmasters tool didnt told me anything.

My question is wherer can i find more informations why exacly this page has been banned/blocked. (In terms there are lots of possible reasons)

What to do to unblock this? Who or where to send the request?

解决方案

My web application had this same error occur, and we fixed it by updating our link to the Google Maps API file.

Previously we were using a downloaded version of the Maps API file located at http://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&sensor=SET_TO_TRUE_OR_FALSE.

When we instead used the direct link, this particular error went away.

Edit: Even if you're directly linking to Google's js file, make sure your application isn't using an older locally cached version.

Not working version:

<script type="text/javascript" src="local_google_maps_api.js">

Working version:

<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&sensor=SET_TO_TRUE_OR_FALSE">

Google likely started invalidating Google API v3 calls using older address versions. The Javascript code files mainly differ in the API IP address call

这篇关于Google Maps API - 在域上停用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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