How To Use Geodosu I API

There is four ways to use Geodosu API.
Note: Geodosu II Multi-lingual API is NOT available yet. Following document is for current version.

(I).
From JavaScript with Google Maps API

Geodosu can be integrated with GoogleMaps API seamlessly. With following code, GoogleMaps's function 'GClientGeocoder.getLatLng()' can handle Kyoto's address.

i)
include "gclientgeocoder_geodosuextension.js".
<script src="http://geodosu.com/"http://geodosu.com/http://api.geodosu.com/gclientgeocoder_geodosuextension.js"" type=""text/javascript""></script>

ii)
Use class "GClientGeocoderWithGeodosu()" instead of standard "GClientGeocoder()" class.
Before:  var geocoder = new GClientGeocoder();
After:   var geocoder = new GClientGeocoderWithGeodosu({API Key});

It call Google's geocoder function. If it fails, search by Geodosu.
Return object is compatible with original Google function.

(II).
Geocoder Proxy for Google HTTP Geocoder
Input/Output format is compatible with GoogleMaps' HTTP Geocoder. If GoogleMaps' geocoder fails, search by Geodosu for Kyoto's address.
    Before:                          http://maps/google.com/maps/geo?・・・・・・・・・・・
    After:  http://api.geodosu.com/{APIkey}/maps/google.com/maps/geo?・・・・・・・・・・・

(III).
Geocoder Proxy for Yahoo! Local search geocoder
Input/Output format is compatible with Yahoo! Local search geocoder. If Yahoo's geocoder fails, search by Geodosu for Kyoto's address.

    Before:                          http://map.yahooapis.jp/LocalSearchService/V1/LocalSearch?・・・・・・・・・・・
    After:  http://api.geodosu.com/{APIkey}/map.yahooapis.jp/LocalSearchService/V1/LocalSearch?・・・・・・・・・・・

(IV).
Geodosu original API

Provide consolidation search with following guest geocoders.
    * Alps Lab. Geocoder (Yahoo!)
    * Center for spatial information Science, Tokyo University
    * GoogleMaps HTTP geocoder
    * Yahoo! Local Search
    * OKI Lab. LocoSticker Geocode API
    * Cirius Lab. GeoPointAPI

URI
http://api.geodosu.com/{APIkey}/geodosu?

APIkey
Contact us for unlimited evaluation API key for free.

address Address in  UTF-8, url encoded

"searchorde"
order od consolidation search
(alps、 csis、 gmap、 oki、 yahoo、 cirius、 geodosu)

"cascade"
'full': Run consolidate all specified guest geocoder. It may takes time. Return all results.
'one'(default) Run consolidate search, but stop if geocode succeed. Retuen only one result.

"datum"
'wgs84'(default) or 'tokyo'

"format"
'degree(default)' of 'dms'(degree/minutes/second)

"output"
'xml'(default) or 'json'

"callback'
Name of callback function in JSONP format when output=json.

RESPONSE FORMAT

<results>
<result>
<geocoder>alps</geocoder>
<copyright>
Yahoo株式会社 アルプスラボ Alpslab Base geocoder API
</copyright>
<geocoded>0</geocoded>
<coordinates>
<datum>wgs84</datum>
<point>
<lat>35.005650</lat>
<lon>135.764679</lon>
<locapoint>SB4.WT5.LO4.AA0</locapoint>
</point>
<estrange_sw>
<lat>35.0103495</lat>
<lon>135.761758</lon>
<locapoint>SB4.WU9.VR1.HX5</locapoint>
</estrange_sw>
<estrange_ne>
<lat>35.0115415</lat>
<lon>135.76245</lon>
<locapoint>SB4.WU9.WV4.IG3</locapoint>
</estrange_ne>
</result>

<result>"