View
1.771
Download
0
Category
Preview:
Citation preview
如何運用 Yahoo!奇摩地圖 API
Presented by
Digwow 好康挖挖哇
Agenda
Why Yahoo! Map成品展示進階運用 : Geocoder cache
Why Yahoo! Map
在地資訊較完整精確,能提供較多提示指引資訊。 Ex. 台北火車站
版面視覺效果較賞心悅目,亦較接近本站的風格。
Why Yahoo! Map – 在地資訊較完整精確
Why Yahoo! Map – 在地資訊較完整精確
Ex. 新竹縣新豐鄉上坑村坑子口 102-1 號 ( 小叮噹科學園區 )
Why Yahoo! Map – 提供較多指引資訊
Why Yahoo! Map – 提供較多指引資訊
成品展示
進階運用 – Geocoder cache
考量到 : 經緯度不是經常變動的資訊 連回主機查詢速度上不及本機資料庫快 免費的服務通常有使用次數上的限制
假定一天的上限 是 50000 次若是一張地圖上需插滿 20+ marker ,每一個地址皆連回 Server 查經緯度,只要超過 2500 page views,就會有破表的危機
進階運用 – Geocoder cache
流程示意圖
getGeoPoint(addr)查詢資料庫中是否有
此地址之經緯度
有,回傳
從 Yahoo Geocoder 查詢此地址之經緯度資料
所得資料寫回資料庫
回傳
無
附錄一 . Yahoo! Geocoder Service
官方網站 http://developer.yahoo.com/maps/rest/V1/geocode.html
Query syntax http://local.yahooapis.com/MapsService/V1/geocode?
appid=<YOUR APPID>&location=<Your Address>
Response
附錄一 . Yahoo! Geocoder Service
<?xml version="1.0" encoding="UTF-8"?>
<ResultSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:yahoo:maps"
xsi:schemaLocation="urn:yahoo:maps http://local.yahooapis.com/MapsService/V1/GeocodeResponse.xsd">
<Result precision="address">
<Latitude>37.416384</Latitude>
<Longitude>-122.024853</Longitude>
<Address>701 FIRST AVE</Address>
<City>SUNNYVALE</City>
<State>CA</State>
<Zip>94089-1019</Zip>
<Country>US</Country>
</Result>
</ResultSet>
Recommended