Google Maps API错误:RefererNotAllowedMapError [英] Google Maps API error: RefererNotAllowedMapError

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

问题描述

我们在服务器B上有一个新网站(比如说www.website.com),它现在还没有生效,它在一个页面上使用谷歌地图。



旧版本的网站在服务器A上没有使用谷歌地图。



我创建了一个带域名的浏览器密钥--www.website.com和我的hosts文件使用www.website.com设置服务器B的IP地址,并试图测试谷歌地图,但它不起作用。



这是我得到的错误 -



Google Maps API错误:Google Maps API错误:RefererNotAllowedMapError https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error
您要授权的网站网址: http://www.website。 com / page-that-has-google-map



关于h的任何建议解决这个问题?我想测试服务器B上的谷歌地图页面,并确保网页正常工作,然后使服务器B上的网站生效。



TIA

解决方案

网站名称为www.website.com,但我添加了website.com,所以当我添加 *。website时。 com / * 添加到浏览器密钥API中,解决了问题。

We have a new website(say www.website.com) on Server B which is not live yet, which is using google maps on a page.

The old version of the website is on Server A is not using google maps.

I have created a browser key with domain name - www.website.com and in my hosts file set the IP address of Server B with www.website.com and tried to test google maps, but it is not working.

This is the error I am getting -

"Google Maps API error: Google Maps API error: RefererNotAllowedMapError https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error Your site URL to be authorized: http://www.website.com/page-that-has-google-map

Any suggestions on how to fix this issue? I want to test the google maps page on Server B and make sure the page is working fine before making the website on Server B live.

TIA

解决方案

the website name is www.website.com, but I added website.com, so when I added *.website.com/* to browser key API, that fixed the issue.

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

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