12
如如如如 Yahoo! 如如如如 API Presented by Digwow 如如如如如

Digwow好康挖挖哇 Yahoo Map

Embed Size (px)

Citation preview

Page 1: Digwow好康挖挖哇 Yahoo Map

如何運用 Yahoo!奇摩地圖 API

Presented by

Digwow 好康挖挖哇

Page 2: Digwow好康挖挖哇 Yahoo Map

Agenda

Why Yahoo! Map成品展示進階運用 : Geocoder cache

Page 3: Digwow好康挖挖哇 Yahoo Map

Why Yahoo! Map

在地資訊較完整精確,能提供較多提示指引資訊。 Ex. 台北火車站

版面視覺效果較賞心悅目,亦較接近本站的風格。

Page 4: Digwow好康挖挖哇 Yahoo Map

Why Yahoo! Map – 在地資訊較完整精確

Page 5: Digwow好康挖挖哇 Yahoo Map

Why Yahoo! Map – 在地資訊較完整精確

Page 6: Digwow好康挖挖哇 Yahoo Map

Ex. 新竹縣新豐鄉上坑村坑子口 102-1 號 ( 小叮噹科學園區 )

Why Yahoo! Map – 提供較多指引資訊

Page 7: Digwow好康挖挖哇 Yahoo Map

Why Yahoo! Map – 提供較多指引資訊

Page 8: Digwow好康挖挖哇 Yahoo Map

成品展示

Page 9: Digwow好康挖挖哇 Yahoo Map

進階運用 – Geocoder cache

考量到 : 經緯度不是經常變動的資訊 連回主機查詢速度上不及本機資料庫快 免費的服務通常有使用次數上的限制

假定一天的上限 是 50000 次若是一張地圖上需插滿 20+ marker ,每一個地址皆連回 Server 查經緯度,只要超過 2500 page views,就會有破表的危機

Page 10: Digwow好康挖挖哇 Yahoo Map

進階運用 – Geocoder cache

流程示意圖

getGeoPoint(addr)查詢資料庫中是否有

此地址之經緯度

有,回傳

從 Yahoo Geocoder 查詢此地址之經緯度資料

所得資料寫回資料庫

回傳

Page 11: Digwow好康挖挖哇 Yahoo Map

附錄一 . 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

Page 12: Digwow好康挖挖哇 Yahoo Map

附錄一 . 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>