Location

I need to put information about where the iPhone is now on UILable on my screen. [Country] [City] [Street] and, possibly, the coordinates [lat] [lng]. For example, in my UILable should be:

Your location - German, Berlin, Tiergarten

Can someone show me a really simple code, how can I get such information that fits in my UILable?

0
source share
2 answers

This MapKit framework (part of iPhone OS 3.0) provides you with this. In particular, the MKPlacemark object, which you can get for a set of coordinates using MKReverseGeocoder.

+2
source

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

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

0
source

All Articles