【发布时间】:2012-07-20 06:51:39
【问题描述】:
请告诉我如何在不使用谷歌地图的情况下从地址获取位置纬度和经度。提前致谢。
【问题讨论】:
-
你自己做过这方面的研究吗?
标签: ios maps latitude-longitude
请告诉我如何在不使用谷歌地图的情况下从地址获取位置纬度和经度。提前致谢。
【问题讨论】:
标签: ios maps latitude-longitude
试试Yahoo! Maps Web Services - Geocoding API怎么样
获取app id后,使用如下get请求
http://local.yahooapis.com/MapsService/V1/geocode?appid=YD-9G7bey8_JXxQP6rxl.fBFGgCdNjoDMACQA--&street=701+First+Ave&city=Sunnyvale&state=CA
你会得到一个类似的 xml 响应
<?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>
【讨论】:
你看过CLLocation?
【讨论】: