GoogleMapsメモ(その2)
http://maps.google.co.jp/maps/geo?を使うと住所から緯度経度の情報に変換できる。
ドキュメントはここ。
http://www.google.com/apis/maps/documentation/#Geocoding_HTTP_Request
パラータは、
q -- The address that you want to geocode.
key -- Your API key.
output -- The format in which the output should be generated. The options are xml, kml, csv, or json.
例えば、こんな感じで投げれば、
http://maps.google.co.jp/maps/geo?q=新宿区西新宿2丁目8−2&key=ABQ.....&output=xml
こんな感じで返ってくる。
<kml>
<Response>
<name>新宿区西新宿2丁目8−2</name>
<Status>
<code>200</code>
<request>geocode</request>
</Status>
<Placemark>
<address>日本東京都新宿区西新宿2丁目8−1</address>
<AddressDetails Accuracy="1">
<Country>
<CountryNameCode>JP</CountryNameCode>
<AddressLine>東京都新宿区西新宿2丁目8−1</AddressLine>
</Country>
</AddressDetails>
<Point>
<coordinates>139.691711,35.689527,0</coordinates>
</Point>
</Placemark>
</Response>
</kml>
ドキュメントはここ。
http://www.google.com/apis/maps/documentation/#Geocoding_HTTP_Request
パラータは、
q -- The address that you want to geocode.
key -- Your API key.
output -- The format in which the output should be generated. The options are xml, kml, csv, or json.
例えば、こんな感じで投げれば、
http://maps.google.co.jp/maps/geo?q=新宿区西新宿2丁目8−2&key=ABQ.....&output=xml
こんな感じで返ってくる。
<kml>
<Response>
<name>新宿区西新宿2丁目8−2</name>
<Status>
<code>200</code>
<request>geocode</request>
</Status>
<Placemark>
<address>日本東京都新宿区西新宿2丁目8−1</address>
<AddressDetails Accuracy="1">
<Country>
<CountryNameCode>JP</CountryNameCode>
<AddressLine>東京都新宿区西新宿2丁目8−1</AddressLine>
</Country>
</AddressDetails>
<Point>
<coordinates>139.691711,35.689527,0</coordinates>
</Point>
</Placemark>
</Response>
</kml>
by yojige
| 2007-03-19 06:50
| IT