0

I am trying to retrieve the user address using MKReverseGeocoder. It works fine, but I am not getting the address in the proper format.

code:

- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark{
    NSLog(@"Geocoder completed");
    NSLog(@"%@",[placemark.addressDictionary objectForKey:@"FormattedAddressLines"]);
}

Output:

(
    "Almungev\U00e4gen 33",
    "Tempe, AZ 85281",
    USA
)

Why am i getting those strange characters in street name ? How can i change it to a readable format?

Help would be appreciated.

Neelesh
  • 3,673
  • 8
  • 47
  • 78

1 Answers1

1

In

  - (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark

   {
   Nsstring*subLocalityStr= placemark.subLocality;
   Nsstring*subAdministrativeAreaStr= placemark.subAdministrativeArea;

   }

similarly you can get using dot notation which will give list of available methods from that you can select what you want ..