2011-02-06 22 views

答えて

2

GoogleジオコーディングAPIの問題が解決されない場合は、Yahoo PlaceFinder Web Serviceはどうですか?例えば

、このクエリ http://where.yahooapis.com/geocode?location=701+First+Ave,+Sunnyvale,+CA&appid=yourappid

は、このXML結果

<?xml version="1.0" encoding="UTF-8"?> 
<ResultSet version="1.0"> 
    <Error>0</Error> 
    <ErrorMessage>No error</ErrorMessage> 
    <Locale>us_US</Locale> 
    <Quality>87</Quality> 
    <Found>1</Found> 
    <Result> 
    <quality>87</quality> 
    <latitude>37.416275</latitude> 
    <longitude>-122.025092</longitude> 
    <offsetlat>37.416397</offsetlat> 
    <offsetlon>-122.025055</offsetlon> 
    <radius>500</radius> 
    <name></name> 
    <line1>701 1st Ave</line1> 
    <line2>Sunnyvale, CA 94089-1019</line2> 
    <line3></line3> 
    <line4>United States</line4> 
    <house>701</house> 
    <street>1st Ave</street> 
    <xstreet></xstreet> 
    <unittype></unittype> 
    <unit></unit> 
    <postal>94089-1019</postal> 
    <neighborhood></neighborhood> 
    <city>Sunnyvale</city> 
    <county>Santa Clara County</county> 
    <state>California</state> 
    <country>United States</country> 
    <countrycode>US</countrycode> 
    <statecode>CA</statecode> 
    <countycode></countycode> 
    <uzip>94089</uzip> 
    <hash>DDAD1896CC0CDC41</hash> 
    <woeid>12797150</woeid> 
    <woetype>11</woetype> 
    </Result> 
</ResultSet> 
などあなたがXML、JSON、シリアライズされたPHPでの結果(複数可)を要求することができ

+0

と私はちょうど都市、州と国jsを使用してこれを使用して取得することができます – aWebDeveloper

+0

はい。ウェブサービスは、その国のストリートレベルの情報が利用できる場合は、国を含む完全な住所を返します。 Yahooには約75カ国のリストがあります。そのドキュメントをチェックしてください。 – Nimrod

+0

質問に例を追加しました。 – Nimrod

2

Google Geocoding APIをご覧になり、それがあなたのニーズに合っていないかどうかを確認してください。

+0

逆ジオコーディングセクションの表示 –

+0

逆ジオコーディングをサポートしていますが、Googleマップで使用するつもりはありません。Googleのポリシーによると、彼はGoogleの地図 – aWebDeveloper

2
<form id="form1" runat="server"> 
<div> 
    <script type="text/javascript" src="http://j.maxmind.com/app/geoip.js" ></script> 
    <br />Country Code: 
    <script type="text/javascript">document.write(geoip_country_code());</script> 
    <br />Country Name: 
    <script type="text/javascript">document.write(geoip_country_name());</script> 
    <br />City: 
    <script type="text/javascript">document.write(geoip_city());</script> 
    <br />Region: 
    <script type="text/javascript">document.write(geoip_region());</script> 
    <br />Region Name: 
    <script type="text/javascript">document.write(geoip_region_name());</script> 
    <br />Latitude: 
    <script type="text/javascript">document.write(geoip_latitude());</script> 
    <br />Longitude: 
    <script type="text/javascript">document.write(geoip_longitude());</script> 
    <br />Postal Code: 
    <script type="text/javascript">document.write(geoip_postal_code());</script> 

</div> 
</form> 
を返します。
+0

いいですが、具体的ではありません** Irbid **と呼ばれる都市で私はイムを意味し、それは私に都市名を表示します**アンマン**私はこのプロバイダはユーザーの実際の場所ではなくインターネットプロバイダーによると思います。 –

関連する問題