Reputation: 19
I am able to fetch latitude, longitude, city & address using CLLocationManagerDelegate. But i am unable to get ZipCode for some locations. Is there any way to get near by ZipCode using latitude and longitude?
Thanks in advance.
Upvotes: 1
Views: 3644
Reputation: 470
CLLocation
with the lat/long values you got from the locationManagerDelegate
CLGeocoder
and use - (void)reverseGeocodeLocation:(CLLocation *)location completionHandler:(CLGeocodeCompletionHandler)completionHandler
(See reference)placemark
.postalCode
(See reference)Upvotes: 5
Reputation: 2716
if the thePlacemark.postalCode is empty, you could try to increase the horizontal accuracy of the CLLocation with:
– initWithCoordinate:altitude:horizontalAccuracy:verticalAccuracy:timestamp:
Upvotes: 0