Getting user's location in iOS is different from MKMapView and CLLocationManager

Im using CLLocationManager to get the location of the user, otherwise Im using MKMapview to display on the map.

 - (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations 
{
   16.50374457,+80.66301357 // lat and long 
}


-(void)mapView:(MKMapView *)mapView didUpdateUserLocation:(MKUserLocation *)userLocation
{

 CLLocationCoordinate2D loc = [userLocation coordinate];

//(latitude = 16.507553768993734, longitude = 80.664011964856343)
}

The two results were slightly different. According to my observation, the second is the most accurate. AS R and D MKMapview uses the internal Cllocation manager, but why am I getting the differences?

+4
source share

All Articles