Reputation: 1327
I have been programming for ios and I need to get address. How can I get full address from latitude and longitude in json or other format? Can I get it without internet connection? Thank you for your attention.
Upvotes: 0
Views: 6342
Reputation: 1840
Take a look in the Apple documentation for CLGeocoder -- specifically the reverseGeocodeLocation:completionHandler: method. It takes a CLLocation and returns reverse Geocode information you're looking for. And since this uses Google Maps, you will need an Internet connection.
Upvotes: 1
Reputation: 2686
What you need is the CLGeocoder
(on iOS 5) and MKReverseGeocoder
(on older iOS versions).
Both use Google Maps to get address data so you need an internet connection to get data.
You'll get address as NSDictionary
, but you can easily convert it to a JSON string with JSONKit or many other tools.
Upvotes: 5