I know from documentation we can find distance between two CLLocation
points using the function, distanceFromLocation:
. But my problem is I dont ha
let point1 = MKMapPointForCoordinate(myLocation)
let point2 = MKMapPointForCoordinate(friendLocation)
let distance = MKMetersBetweenMapPoints(point1, point2)/1000
let distanceStr = NSString(format: "%.3f", distance)
Simple version of Valleri's answer. Divide by 1000 to get KM followed by conversion to string.