本质上,我试图在本地编写我的google地图项目,但我只是得到了这些错误。
Google has disabled use of the Maps API for this application. The provided key is not a valid Google API Key, or it is not authorized for the Google Maps Javascript API v3 on this site....似乎其他答案是为google API的另一个版本编写的,因为我已经尝试了建议的修复,并列出了以下白名单:
*humboldt.edu/*
*localhost*
file://*
http://localhost/*如前面的问题所暗示的,是不起作用的。
发布于 2014-06-11 06:49:08
在开发项目时,请不要使用密钥,否则请忽略推荐人。
referer是用来防止密钥被滥用的,像localhost/*这样的referer不会保护密钥,有很多人都有“本地主机”。
当您确实需要/想要使用密钥(带有引用)时,您可以尝试创建一个运行应用程序的虚拟主机,并使用该虚拟主机作为引用。
https://stackoverflow.com/questions/24151534
复制相似问题