2016-08-16 2 views
-1

上のエラー私のGoogleは、それはまた、他のブラウザとのプライベートセッションや他の機器で、私のPC上に表示されているhereGoogleマップ、他人

をマップに問題があります。 残念ながら、私の顧客、ウェブサイトの所有者、その他のデバイスには見えません。 コンソールが

Google Maps API warning: NoApiKeys

You have included the Google Maps API multiple times on this page. This may cause unexpected errors.

を言うこれは私が持っているものです。

<div id="map" style="width:100%; height:450px;"></div> 
        <script> 
        function initMap() { 
         var myLatLng = {lat: 50.8394968, lng: 4.2694918}; 

         var map = new google.maps.Map(document.getElementById('map'), { 
          zoom: 16, 
          center: myLatLng 
         }); 

         var marker = new google.maps.Marker({ 
          position: myLatLng, 
          map: map, 
          title: 'Hello World!' 
         }); 
         marker.setMap(map); 

         var infowindow = new google.maps.InfoWindow({ 
          content:"<p style='text-align:center;'>Wellness All-In <br>"+ 
          "Broekstraat 56 – 1700 Dilbeek<br>"+ 
          "0496/44.55.56<br>"+ 
          "[email protected]</p>" 
         }); 

         google.maps.event.addListener(marker, 'click', function() { 
          infowindow.open(map,marker); 
         }); 
        } 
        </script> 
        <script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyA5RLhWKFn4P2XVc8G_yho1oun7xS1RtfU&callback=initMap"></script> 

       </div> 

誰もがこの問題を解決する方法を知っていますか?

答えて

1

Googleマップを2回追加しました。キー

<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyA5RLhWKFn4P2XVc8G_yho1oun7xS1RtfU&callback=initMap"></script> 

としたら、一度二

<script src="http://maps.googleapis.com/maps/api/js"></script> 

せずに削除するには、ステートメントを含めます。

あなたのサイトには、次のエラーを示しています

Google Maps API error: RefererNotAllowedMapError https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error Your site URL to be authorized: http://www.wellnessallin.be/contact.php

はあなたのウェブサイトが指定したキーのGoogle APIコンソールで許可される参照元のリストに追加されていることを確認します。

+0

これは、ありがとうございました! –