I was wondering if there's a way to obtain the accuracy of a received location from an MKMapView.
I would have thought the following code would work but it doesn't. Can I log the property directly as well?
- (void)mapView:(MKMapView *)mapView didUpdateUserLocation:(MKUserLocation *)userLocation {
if (userLocation.location.horizontalAccuracy == kCLLocationAccuracyBest) {
NSLog(@"Best");
}
if (userLocation.location.horizontalAccuracy == kCLLocationAccuracyBestForNavigation) {
NSLog(@"Best for nav");
}
if (userLocation.location.horizontalAccuracy == kCLLocationAccuracyHundredMeters) {
NSLog(@"100m");
}
if (userLocation.location.horizontalAccuracy == kCLLocationAccuracyKilometer) {
NSLog(@"km");
}
if (userLocation.location.horizontalAccuracy == kCLLocationAccuracyNearestTenMeters) {
NSLog(@"10m");
}
if (userLocation.location.horizontalAccuracy == kCLLocationAccuracyThreeKilometers) {
NSLog(@"3km");
}
}
A circle usually represents the accuracy of a location by wrapping it round the small blue circle so the accuracy is obviously being sent.
Thanks for any help you can offer.