2012-07-20 78 views

回答

0

你有沒有看着CLLocation?

+0

我嘗試使用CLGeocoder,它顯示地圖視圖中的位置,但我需要顯示從地圖視圖中的起點到終點的路線方向。可以給我任何想法如何使用谷歌地圖顯示出來。 – user1423012 2012-07-20 13:49:32

1

如何試圖Yahoo! Maps Web Services - Geocoding API

獲取應用程序ID後,用GET請求像下面

http://local.yahooapis.com/MapsService/V1/geocode?appid=YD-9G7bey8_JXxQP6rxl.fBFGgCdNjoDMACQA--&street=701+First+Ave&city=Sunnyvale&state=CA 

你得到像

<?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> 
一個XML響應
相關問題