开发者

Get Place Location

开发者 https://www.devze.com 2022-12-08 01:55 出处:网络
I need put information about place, where is iPhone now, to UILable in my screen. [Country][City][Street] and maybe coordinates [lat][lng]. For example in my UILab开发者_如何学JAVAle should be:

I need put information about place, where is iPhone now, to UILable in my screen. [Country][City][Street] and maybe coordinates [lat][lng]. For example in my UILab开发者_如何学JAVAle should be:

Your location is German, Berlin, Tiergarten

Can someone show me really simple code how can i get such information that put in my UILable?


The MapKit framework (part of iPhone OS 3.0) provides this for you. Specifically the MKPlacemark object, which you can obtain for a set of co-ordinates using an MKReverseGeocoder.


You need access to a reverse geocoding service, which will take your lat/lon coordinates as input and return some kind of structured address of that location.

Google's is available here: http://code.google.com/apis/maps/documentation/geocoding/index.html#ReverseGeocoding

0

精彩评论

暂无评论...
验证码 换一张
取 消