2017-02-01 17 views
0

アプリケーションは午前中に完全に動作しますが、クォータが終了するまではその日には動作しません。私たちは以下のエラーに直面しています。2500リクエスト後にGoogleマップのOVER_QUERY_LIMITエラーが発生しました

Googleではプレミアムサービスを使用しており、マップバージョン3の登録クライアントはすべて正常です。遅延やタイムアウトは、ループのように見えるので、動作しません。ここで

は、コードは次のとおりです。私たちが直面している以下のエラーが表示

_resolveInitialLocation: function() { 
        var url = "https://maps.googleapis.com/maps/api/geocode/json?latlng=" + this._currentLatitude + "," + this._currentLongitude; 


      if (this._customerAddress) { 

       url = "https://maps.googleapis.com/maps/api/geocode/json?address=" + this._customerAddress; 
      } 

      return xhr(url, { 
       headers: { "X-Requested-With": null }, 
       handleAs: "json" 
      }).then(lang.hitch(this, function (place) { 
       // this._search(place.results[0]); 
       this._place = place.results[0]; 

       if (dom.byId("pac-input")) { 
        dom.byId("pac-input").value = this._place.formatted_address; 
       } 

       this._currentLatitude = this._place.geometry.location.lat; 
       this._currentLongitude = this._place.geometry.location.lng; 
      })); 
     }, 

     _initGoogleMaps: function (/* Boolean */ preSearch) { 
      // summary 
      //  this function will initialize google maps api 
      // tags 
      //  branch locator, google maps, maps 

      if (this._place) { 
       this._currentLatitude = typeof this._place.geometry.location.lat === "function" ? this._place.geometry.location.lat() : this._place.geometry.location.lat; 
       this._currentLongitude = typeof this._place.geometry.location.lng === "function" ? this._place.geometry.location.lng() : this._place.geometry.location.lng; 
      } 

      var initialLocation = new 

google.maps.LatLng(this._currentLatitude, this._currentLongitude); 
       . 
.. 
.. 
       }; 

してください。 Dojo Javaスクリプトlibを使用しています。事前に

https://maps.googleapis.com/maps/api/geocode/json?latlng=22.280297,114.159514 
{ 
"error_message" : "You have exceeded your daily request quota for this API. We recommend registering for a key at the Google Developers Console: https://console.developers.google.com/apis/credentials?project=_", 
"results" : [], 
"status" : "OVER_QUERY_LIMIT" 
} 

ありがとう:

googleapis.comからのHTTPリクエストのgetエラーがあります。

答えて

1

プレミアムアカウントを持つマップバージョン3の登録クライアントの場合、ほとんどの場合、URLに「APIキー」のパラメータがありませんでした。

GoogleマップのAPIプレミアムプランに基づきAPIを使用している場合は、2つの認証オプションがあり :あなたは を購入するとき、あなたのために作成したGoogle Maps APIをプレミアムプランプロジェクトで設定したAPIキーを使用しますプレミアムプラン、またはAPIキーの代わりにクライアントIDを使用します。 Source

+0

おかげGibboK、これは我々がhitting..httpsいるURL:?//maps.googleapis.com/maps/api/jsクライアント= GME-ABCD&センサー=偽&V = 3&ライブラリ=幾何学、場所&コールバック= URLでinitGoogleMaps私はabcdと会社名を変更しただけです。もしそれが間違っていれば、Plsは助けます。 –

+0

@SandipManteあなたのメッセージのおかげで、私の答えが役に立つと思うなら、upvoteを忘れたり、アイコンの矢印を使ってそれを受け入れるか、左側をチェックしてください。感謝と幸せなコーディング! – GibboK

関連する問題