I found this issue with distanceFromLocation function where the return value is not accurate. Please confirm if I did it wrongly or the function is buggy.
CLLocation *locA = [[CLLocation alloc] initWithLatitude:5.321008 longitude:100.290131];
CLLocation *locB = [[CLLocation alloc] initWithLatitude:5.321008 longitude:100.290138];
CLLocationDistance distance = [locA distanceFromLocation:locB];
NSLog(@"distance: %f, locA: %f,%f, locB: %f,%f",distance,locA.coordinate.latitude,locA.coordinate.longitude,locB.coordinate.latitude,locB.coordinate.longitude);
The output is:
distance: 0.775644, locA: 5.321008,100.290131, locB: 5.321008,100.290138
Both locations are near and should be less than 10 meters. However, the function return larger distance. Checked with site such as http://jan.ucc.nau.edu/~cvm/latlongdist.html and the distance should be:
Distance between 5.321008N 100.290131E and 5.321008N 100.290138E is 0.0008 km
Your answer is in meters if you convert it to kilemeters you get
0.000775 kmwhich is roughly the same. see reference documentation from apple for more.