2

更新: OVER_QUERY_LIMIT の推奨事項に基づいて、潜在的に有望な解決策を見つけたので、今夜試してみます。

最初、Google Map API v3 を PC に表示することができませんでした。同じコードが Amazon サーバーで機能しました。Rackspace に移動しましたが、表示されません。私が使用しているコードは次のとおりです。

<script  type="text/javascript"
  src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBiv-nrDCYEEGzD1mk3jAfapfrBH878pqc&sensor=true">
</script>
<script>
  var geocoder;
  var map;
  function initialize() {
    geocoder = new google.maps.Geocoder();
    var phpAddressInit = "<?php echo $mapAddress ?>";
    //document.write("phpAddressInit: " + phpAddressInit);
    //var latlng = new google.maps.LatLng(-34.397, 150.644);
    var latlng = new google.maps.LatLng(33.5750, -117.7256);
    var mapOptions = {
      zoom: 10,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    }
    map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions);
    geocoder.geocode( { 'address': phpAddressInit}, function(results, status) {
      //alert("---address3: " + phpAddressInit);
      if (status == google.maps.GeocoderStatus.OK) {
        map.setCenter(results[0].geometry.location);
        var marker = new google.maps.Marker({
            map: map,
            position: results[0].geometry.location
        });
      } else {
        alert('Geocode was not successful for the following reason: ' + status);
      }
    });
  }

  function codeAddress(control,ctrlAddress) {
    //alert("---in codeAddress; " + "control: " + control
    //      + "ctrlAddress: " + ctrlAddress);
    //var address = document.getElementById('address').value;
    //aws.push
    var address;
    if ( control == 1 )
    {
        address = document.getElementById('address').value;
    }
    else
    {
        address = ctrlAddress;
    }

    geocoder = new google.maps.Geocoder();
      //alert("---address1: " + address);
    geocoder.geocode( { 'address': address}, function(results, status) {
      //alert("---address2: " + address);
      if (status == google.maps.GeocoderStatus.OK) {
        map.setCenter(results[0].geometry.location);
        var marker = new google.maps.Marker({
            map: map,
            position: results[0].geometry.location
        });
      } else {
        alert('Geocode was not successful for the following reason: ' + status);
      }
    });
  }
</script>

...

これを数時間グーグル検索し、いくつかの異なる例を試しましたが、表示されません。私は何が欠けていますか?

4

1 に答える 1

0

Seb P は、それが現在機能していることを知らせてくれました。ありがとう、それは今働いています。

動作しなかった元のコードをまだ使用しているため、問題が修正されたと自信を持って言うことはできません。OVER_QUERY_LIMIT に関連付けられたリンクを見ると、Rackspace はユーザーをグループ化して同じ IP を使用しているようで、このエラーが発生します。

これは確認されていませんが、私が見ているものと一致しているようです. この問題を回避できるように、誰かがこれにもっと光を当てることができればうれしいです。

于 2013-06-11T17:41:06.753 に答える