2013-08-23 16 views
8

Google Geocoding APIを使用して住所を緯度と経度にマッピングします。ここでGoogle Geocoding APIのAPIキーはどこに置くのですか?

は(JSONを返す)の符号化のためのサンプルURLです -

http://maps.googleapis.com/maps/api/geocode/json?address=Dallas&sensor=false

メッセージ:私たちはAPIを置くように、我々は2500以上の値幅制限を超えているためOVER_QUERY_LIMIT

OK、これは、理にかなっていますこのようなキー -

http://maps.googleapis.com/maps/api/geocode/json?key=xxxxx&address=Dallas&sensor=false

メッセージ:REQUEST_DENIED

私はAPIキーをどこに配置するのかと思います。

+0

ビジネスアカウント用のAPIキーがあります。一般的にGoogleマップAPIを使用するための無料のキーではありません。 – Matthew

+0

ここから私の答えに情報を追加しました:https://developers.google.com/maps/documentation/business/clientside/ – Matthew

+0

デベロッパーコンソール(API)キーは、Google Mapsクライアントでのみ使用できます。サイドAPI。あなたが作っている呼び出しは、Google Maps Geocoding WebサービスAPIへのものです。したがって、 'REQUEST_DENIED'レスポンスです。 –

答えて

11

あなたは無料版でやるようkeyをバージョン3にあなたがURLにClientIDを渡す必要がありますように見えるといない:http://maps.googleapis.com/maps/api/geocode/json?client=xxxxx&address=Dallas&sensor=false

ない:https://developers.google.com/maps/articles/v2tov3#newkey

だからあなたのURLは次のようになります私はテストすることはできません - しかし、私はそれが正しい道にあなたを得るだろうと思う。このリンクから関連

:フラッシュ用https://developers.google.com/maps/documentation/business/webservices/

Client ID

You must include your client ID in all API requests. Your client ID identifies you as a Maps API for Business customer and enables support and purchased quota for your application. Requests made without a client ID are not eligible for Maps API for Business benefits.

If you're switching from the free API services to a Maps API for Business implementation, you must remove the key parameter from your requests. Google Maps API web services will deny requests made with both a client ID and a key.

More information is available in the Authentication and Authorization chapter of this guide.

If you have lost your client ID, you can recover it by logging in to the support portal and clicking Maps: Add URLs from the links on the left of the page.

EDIT地球API、V2 APIにクライアントIDを渡す方法の手順などの詳細については、

、およびMaps APIを、 Loading Client-side APIsをお読みください。

クライアントIDまたは暗号鍵を紛失した場合は、support portalにログインして、ページの左側のリンクから[マップ:URLを追加]をクリックして復元できます。

+2

Googleは電話でGoogleとのチャットを終了しました。残念ながら、ジオコーディング用のビジネスアカウントはありませんでした。年間$ 17,000 ***の費用がかかります。今私たちはクライアントと話しています。手伝ってくれてどうもありがとう。 – Win

+0

キャッシュの制限を回避するには、アプリケーションのデータベース内にキャッシュがあるかどうか(ジオコーディングの対象(あまり同じではないアドレス) - 基本的にシェルを外す必要があるか、頻繁に再利用される共通の場所なので) Googleの新しいAPIを呼び出す)。 – Matthew

+0

関連性:http://gis.stackexchange.com/questions/15052/how-to-avoid-google-map-geocode-limit – Matthew