配置 Google Maps API 时出现 MissingKeyMapError [英] MissingKeyMapError when configuring Google Maps API
问题描述
我正在尝试像这样在我的网站上配置 Google Maps API 密钥:
<div class="border-bottom"></div><div id="google-map" class="rd-google-map__model" data-zoom="10" data-x="77.079627" data-y="28.643150"></div><ul class="rd-google-map__locations"><li data-x="77.079627" data-y="28.643150"><p>58, Ist Floor, DDA Local Shopping Centre, Block J, Vikaspuri, Del 110018</p>
我收到以下错误:
<块引用>"Google Maps API 错误:MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error http://maps.google.com/maps/api/js:34"
URL 是 dranandspetsclinic.com/new/
.
打开 js/script.js 并搜索类似这样的行
$.getScript("http://maps.google.com/maps/api/js?sensor=false&libraries=geometry,places&v=3.7&key=ADD_YOUR_KEY_HERE", function ()
I am trying to configure the Google Maps API key on my website like this:
<div class="rd-google-map">
<div class="border-bottom"></div>
<div id="google-map" class="rd-google-map__model" data-zoom="10" data-x="77.079627" data-y="28.643150"></div>
<ul class="rd-google-map__locations">
<li data-x="77.079627" data-y="28.643150">
<p>58, Ist Floor, DDA Local Shopping Centre, Block J, Vikaspuri, Delhi, 110018</p>
</li>
</ul>
</div>
I get the following error:
"Google Maps API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error http://maps.google.com/maps/api/js:34"
The URl is dranandspetsclinic.com/new/
.
Open js/script.js and search for a line with something like this
$.getScript("http://maps.google.com/maps/api/js?sensor=false&libraries=geometry,places&v=3.7&key=ADD_YOUR_KEY_HERE", function ()
and add the &key=your_key_here from https://developers.google.com/maps/documentation/javascript/get-api-key?refresh=1
这篇关于配置 Google Maps API 时出现 MissingKeyMapError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!