2セットの地理座標があり、それらの間の距離を計算しようとしています。私はいくつか掘り下げましたが、それを行う方法を理解できません。ユーザー(userLatitude / userLongitude)と場所(placeLatitude / placeLongitude)の間の距離をマイルで取得しようとしています。以下に示すように、私の座標は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"];