Google Maps JavaScript API RefererNotAllowedMapError [英] Google Maps JavaScript API RefererNotAllowedMapError

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

问题描述

我们正在尝试为我们的客户开发一个地理应用程序应用程序,我们首先要在自己的域中测试它。



我们已经为Google映射JavaScript API,我们有一个有效的浏览器密钥,我们的域名www.grupocamaleon.com已被授权使用该密钥。



但我们无法制作即使是最容易运行的例子也没有错误。



在我们的域和我们的密钥中,我们有以下演示:

(1)



为什么我们会得到这个错误?我们如何解决它? TIA

解决方案

我知道这是一个老问题,已经有好几个答案,但我遇到了同样的问题,是我遵循console.developers.google.com上提供的示例,并以 *。domain.tld / * 格式输入了我的域。这根本不起作用,我尝试添加各种变体,如 domain.tld domain.tld / * *。domain.tld 等等。



em>协议; http://domain.tld/* 是我需要的唯一一个在我的网站上工作的人。如果我要切换到HTTPS,我想我需要添加 https://domain.tld/*


We're trying to develop an geoplacement app for one of our clients, and we want first to test it in out own domain.

We have signed for Google Maps JavaScript API, and we have a valid browser key and our domain, www.grupocamaleon.com, has been authorized to use that key.

But we can't make even the easiest example to run without error.

We have, in our domain and with our key, the following demo:

(1) http://www.grupocamaleon.com/boceto/aerial-simple.html

But it doesn't work, and Firebug console says:

"Google Maps API error: Google Maps API error: RefererNotAllowedMapError (link to Google documentation on RefererNotAllowedMapError) Your site URL to be authorized: (1)"

My credential page is missing the possibility of adding referrers to accept, so solutions involving adding referrers are not possible right now.

My credential Page:

Why do we get that error? How can we fix it? TIA

解决方案

I know this is an old question that already has several answers, but I had this same problem and for me the issue was that I followed the example provided on console.developers.google.com and entered my domains in the format *.domain.tld/*. This didn't work at all, and I tried adding all kinds of variations to this like domain.tld, domain.tld/*, *.domain.tld etc.

What solved it for me was adding the actual protocol too; http://domain.tld/* is the only one I need for it to work on my site. I guess I'll need to add https://domain.tld/* if I were to switch to HTTPS.

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

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