I am developing an application in which I have to show the address that of the given latitude and longitude. I have latitude and longitude but I dont know how to get my address from that latitude and longitude. Any suggestion will be highly appreciated Thanks in advance!
Asked
Active
Viewed 4,169 times
1
-
1possible duplicate of [How to get the address of a latitude and longitude in an iphone application](http://stackoverflow.com/questions/2063717/how-to-get-the-address-of-a-latitude-and-longitude-in-an-iphone-application) – jscs Aug 22 '11 at 08:06
1 Answers
7
I have done something very similar to this recently. With the coordinates you can use MKReverseGeocoder to get the address.
when you find the coordinates,
self.reverseGeocoder =[[[MKReverseGeocoder alloc] initWithCoordinate:newLocation.coordinate]autorelease];
reverseGeocoder.delegate=self;
[reverseGeocoder start];
//called when reverseGeocoder was successfully able to retreive address
- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark{
NSString *street=[placemark.addressDictionary objectForKey:@"Street"];
//get the different address components
}
//called when reverseGeocoder was unable to retreive address
- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFailWithError:(NSError *)error{
}
Hope this helps

Rudy Velthuis
- 28,387
- 5
- 46
- 94

Neelesh
- 3,673
- 8
- 47
- 78