Hi Guys,
I am developing application based on geocoder. In my app, to get the user current address, i am using placemark address dictionary method inside geocode delegate method and then, i could able to get all the details (street, city, state, county, countrycode and all) except postalcode. Why postal code is not coming?. Now i am working with iOS 4. please help me out.
my code,
- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark
{
placemark = [[MKPlacemark alloc] initWithCoordinate:locationManager.location.coordinate addressDictionary:[placemark addressDictionary]];
NSLog(@"Address Dictionary %@", [placemark addressDictionary]);
NSDictionary * addressDict= [placemark addressDictionary];
country = [addressDict objectForKey:@"Country"];
postal = [addressDict objectForKey:@"PostalCode"];
state = [addressDict objectForKey:@"State"];
city = [addressDict objectForKey:@"City"];
}
This is my current address, which is from placemark address dictionary.
Address Dictionary {
City = Madurai;
Country = India;
CountryCode = IN;
FormattedAddressLines = (
"Lady Doak College Rd, Chinna Chokkikulam, Chockikulam",
"Madurai, Tamil Nadu",
India
);
State = "Tamil Nadu";
Street = "Lady Doak College Rd";
SubAdministrativeArea = Madurai;
SubLocality = "Chinna Chokkikulam";
Thoroughfare = "Lady Doak College Rd";
}
in above code, there is no poastalCode. but i need postal code. to get a postal code, What i want to do? please give a solution .