I am working on Xcode project and I got some problems. In my app, I have a GPS location and I got some taxi service around in 1000 meters radius. I would like to find the closest service near by me. The taxi service location is parsed from JSON. It look like that
NSNumber * latitude = [[diction objectAtIndex:13]objectAtIndex:1];
NSLog(@"lng is =>%@", latitude);
NSNumber * longitude = [[diction objectAtIndex:13]objectAtIndex:2];
NSLog(@"lat is =>%@", longitude);
Moreover, I have my own location like that:
[locationManager stopUpdatingLocation];
NSLog(@"latitude: %f", newLocation.coordinate.latitude);
NSLog(@"longitude: %f", newLocation.coordinate.longitude);
How can I subtract the latitude and longitude above in order to find the closest service. Best Regards.