1

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!

Neelesh
  • 3,613
  • 8
  • 44
  • 75
Gypsa
  • 11,180
  • 6
  • 43
  • 82
  • 1
    possible 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 Answers1

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
  • 27,909
  • 4
  • 45
  • 87
Neelesh
  • 3,613
  • 8
  • 44
  • 75