Javascript 谷歌地图API显示一个错误;“谷歌没有定义”;控制台上

Javascript 谷歌地图API显示一个错误;“谷歌没有定义”;控制台上,javascript,google-maps,Javascript,Google Maps,我正在使用谷歌地图api在我的网站上显示地图。有时它的工作很好,但其他时间我得到以下错误在浏览器控制台。我会非常感激的。谁能帮我解决这个问题 Uncaught ReferenceError: google is not defined at render_map (_main.js:3) at HTMLDivElement.<anonymous> (_main.js:10) at Function.each (jquery.min.js:2) at n.fn.init.each (j

我正在使用谷歌地图api在我的网站上显示地图。有时它的工作很好,但其他时间我得到以下错误在浏览器控制台。我会非常感激的。谁能帮我解决这个问题

Uncaught ReferenceError: google is not defined
at render_map (_main.js:3)
at HTMLDivElement.<anonymous> (_main.js:10)
at Function.each (jquery.min.js:2)
at n.fn.init.each (jquery.min.js:2)
at HTMLDocument.<anonymous> (_main.js:10)
at j (jquery.min.js:2)
at Object.fireWith [as resolveWith] (jquery.min.js:2)
at Function.ready (jquery.min.js:2)
at HTMLDocument.K (jquery.min.js:2)

Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys
未捕获引用错误:未定义google
在render_映射(_main.js:3)
在HTMLDEVELENT。(_main.js:10)
在Function.each(jquery.min.js:2)
在n.fn.init.each(jquery.min.js:2)
在HTMLDocument。(_main.js:10)
在j(jquery.min.js:2)
在Object.fireWith[as resolveWith](jquery.min.js:2)
在Function.ready(jquery.min.js:2)
在HTMLDocument.K(jquery.min.js:2)
谷歌地图API警告:NoApiKeyshttps://developers.google.com/maps/documentation/javascript/error-messages#no-api密钥

根据您的错误:NoApiKeys警告

加载API的脚本元素没有API键。请确保包含有效的API密钥作为密钥参数。您可以在GoogleAPI控制台上生成新的API密钥

查看此链接以获取错误消息