我正在尝试在我的网站上配置Google Maps API密钥,如下所示:
<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>
我收到以下错误:
“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/
。
答案 0 :(得分:1)
打开 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 ()
并从https://developers.google.com/maps/documentation/javascript/get-api-key?refresh=1
添加&amp; key = your_key_here