1

Google開発者のWebサイトでこのコードに出くわしました.コピーして貼り付けてテストすると、GoogleからのAPIアクセスキーが機能する必要がないことがわかります.

<script>
  function initialize() {
    var mapOptions = {
      zoom: 8,
      center: new google.maps.LatLng(-34.397, 150.644),
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };

    var map = new google.maps.Map(document.getElementById('googlemaps'),
        mapOptions);
  }

  function loadScript() {
    var script = document.createElement('script');
    script.type = 'text/javascript';
    script.src = 'https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&' +
        'callback=initialize';
    document.body.appendChild(script);
  }

  window.onload = loadScript;
</script>

Google の API 呼び出しは 1 日あたり 25,000 に制限されていることは知っていますが、何か違法なことをしているのでしょうか?

4

0 に答える 0