我向 heroku 部署了一个反应应用程序,但地图没有显示。我收到这些错误消息:
Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys util.js:248:12
当我尝试将它包含在库中并在 index.html 中使用脚本标签加载它时,我得到:
You have included the Google Maps API multiple times on this page. This may cause unexpected errors.
Google Maps API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error
Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys
注意:密钥限制设置为无。我想知道为什么它在 localhost 中有效,但在 heroku 中无效