2
我有两组地理坐标,我试图计算它们之间的距离。我已经做了一些挖掘,但无法弄清楚如何去做。我正在尝试获取用户(userLatitude/userLongitude)和地点(placeLatitude/placeLongitude)之间的英里距离。我的坐标存储为NSStrings,如下所示。有谁知道如何做到这一点?谢谢你们!计算两组坐标之间的距离(NSStrings)
NSString *userLatitude =[(PDCAppDelegate *)[UIApplication sharedApplication].delegate
getUserLatitude];
NSString *userLongitude =[(PDCAppDelegate *)[UIApplication sharedApplication].delegate
getUserLongitude];
NSString *placeLatitude = [element1 objectForKey:@"placeLatitude"];
NSString *placeLongitude = [element1 objectForKey:@"placeLongitude"];