尝试将谷歌地图连接到我的应用程序并出现该错误:
Google Maps API错误:RefererNotAllowedMapError
您要授权的网站网址
我所做的 ?
我创建api密钥并将其复制到我的应用程序中。我添加谷歌API和我的IP到HTPP凭证,如下所示:
*.localhost:4200/*
http://localhost/
*.localhost:4200/
*.localhost:4200/
localhost:4200/*
还有很多其他的。
我也有这个问题,我已经解决了这个问题,将apiKey留空,你的代码应该是这样的
AgmCoreModule.forRoot({
apiKey: ''
})
并确保为您的项目启用Google Maps API。