i am using CLLocationManager class in my iPad App to get current location.
i am using below code to get Address details,
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
{
NSUserDefaults *oIsLocation = [NSUserDefaults standardUserDefaults];
if([oIsLocation boolForKey:@"IsLocation"])
{
NSTimeInterval locationAge = -[newLocation.timestamp timeIntervalSinceNow];
if (locationAge > 5.0) return;
if (newLocation.horizontalAccuracy < 0) return;
if (bestEffortAtLocation == nil || bestEffortAtLocation.horizontalAccuracy > newLocation.horizontalAccuracy)
{
if(bestEffortAtLocation.coordinate.latitude != newLocation.coordinate.latitude && bestEffortAtLocation.coordinate.longitude != newLocation.coordinate.longitude)
{
[self saveLocation:newLocation];
self.bestEffortAtLocation = newLocation;
[self saveUserLocation];
}
}
}
}
i am doing reverse geocoding to get Details as below:
NSLog(@"placemark.ISOcountryCode %@",placemark.ISOcountryCode);
NSLog(@"placemark.country %@",placemark.country);
NSLog(@"placemark.postalCode %@",placemark.postalCode);
NSLog(@"placemark.administrativeArea %@",placemark.administrativeArea);
NSLog(@"placemark.locality %@",placemark.locality);
NSLog(@"placemark.subLocality %@",placemark.subLocality);
NSLog(@"placemark.subThoroughfare %@",placemark.subThoroughfare);
placemark.locality gives city name but not Full name like North Carolina only NC.
when my clients used app in USA, instead of full name like 'North Carolina' they get NC,Saint Charles get St. Charles ETC.
is there any way to get full names?