私は Xcode プロジェクトに取り組んでいますが、いくつかの問題があります。私のアプリでは、GPS の位置情報があり、半径 1000 メートルの範囲でタクシー サービスを利用できます。近くで最も近いサービスを見つけたいです。タクシー サービスの場所は JSON から解析されます。そのように見えます
NSNumber * latitude = [[diction objectAtIndex:13]objectAtIndex:1];
NSLog(@"lng is =>%@", latitude);
NSNumber * longitude = [[diction objectAtIndex:13]objectAtIndex:2];
NSLog(@"lat is =>%@", longitude);
さらに、私はそのような自分の場所を持っています:
[locationManager stopUpdatingLocation];
NSLog(@"latitude: %f", newLocation.coordinate.latitude);
NSLog(@"longitude: %f", newLocation.coordinate.longitude);
最も近いサービスを見つけるために、上記の緯度と経度を差し引くにはどうすればよいですか。よろしくお願いします。