RefererNotAllowedMapError Google地图API

问题描述:

昨天我试图在网站上放置一个GoogleMap(javascript),但我仍然收到Google Maps API错误:RefererNotAllowedMapErrorRefererNotAllowedMapError Google地图API

下面的步骤我已经采取了:

  • 创建的证书本网站(请求API密钥和API管理这些HTTP referres添加引用接受请求被设置为*.thewebsitedomein.nl/*

  • 验证网站的域名(添加DNS记录中CNAME记录)

但我仍然得到这个RefererNotAllowedMapError

重新生成新密钥没有帮助,有人可以帮助我吗? 有什么我忘记了吗?

谢谢! AHF

在DNS中增加一个新的CNAME记录(不带www),并再次验证网站后查看屏幕转储,显示在谷歌地图没有javascript错误。

从谷歌地图Error Messages文档本身,

RefererNotAllowedMapError means that the current URL loading the Google Maps JavaScript API has not been added to the list of allowed referrers. Please check the referrer settings of your API key on the Google API Console.

还要检查这个相关的SO问题:

+0

嗨! 在我的第一篇文章中,我已经对这些HTTP引用者接受请求的URL进行了插图设置,它被设置为'code' * .thewebsitedomein.nl/*'code' – AHF

的设置

See screen dump for the settings