2011年6月7日 星期二

Google Geocoding & StaticMap

Google Geocoding API(第三版)
http://code.google.com/intl/zh-TW/apis/maps/documentation/geocoding/

Google Geocoding API 不再需要 Maps API 金鑰

範例:
http://maps.google.com/maps/api/geocode/xml?address=307新竹縣芎林鄉大華路一號&sensor=true

結果

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<GeocodeResponse>
<status>OK</status>
<result>
<type>street_address</type>
<formatted_address>307台灣新竹縣芎林鄉大華路1號</formatted_address>
<address_component>
<long_name>1</long_name>
<short_name>1</short_name>
<type>street_number</type>
</address_component>
<address_component>
<long_name>大華路</long_name>
<short_name>大華路</short_name>
<type>route</type>
</address_component>
<address_component>
<long_name>水坑村</long_name>
<short_name>水坑村</short_name>
<type>sublocality</type>
<type>political</type>
</address_component>
<address_component>
<long_name>芎林鄉</long_name>
<short_name>芎林鄉</short_name>
<type>locality</type>
<type>political</type>
</address_component>
<address_component>
<long_name>新竹縣</long_name>
<short_name>新竹縣</short_name>
<type>administrative_area_level_2</type>
<type>political</type>
</address_component>
<address_component>
<long_name>台灣</long_name>
<short_name>TW</short_name>
<type>country</type>
<type>political</type>
</address_component>
<address_component>
<long_name>307</long_name>
<short_name>307</short_name>
<type>postal_code</type>
</address_component>
<geometry>
<location>
<lat>24.7774381</lat>
<lng>121.0902080</lng>
</location>
<location_type>ROOFTOP</location_type>
<viewport>
<southwest>
<lat>24.7742905</lat>
<lng>121.0870604</lng>
</southwest>
<northeast>
<lat>24.7805857</lat>
<lng>121.0933556</lng>
</northeast>
</viewport>
</geometry>
<partial_match>true</partial_match>
</result>
</GeocodeResponse>


Static Maps API 第 2 版開發人員指南 
http://code.google.com/intl/zh-TW/apis/maps/documentation/staticmaps/
Google Static Maps API 不再需要 Maps API 金鑰

範例:
http://maps.google.com/maps/api/staticmap?center=24.7774381,121.0902080&zoom=12&size=400x400&sensor=true

結果



沒有留言: