I want to put facility to display distance between two places selected by user.
Is there any sample source code / service available to do so?
Thanks in advance.
The CoreLocation Framework provides the capability to work out the distance, in meters, between two points:
- (CLLocationDistance)getDistanceFrom:(const CLLocation *)location
You can initialize a CLLocation
object with latitude and longitude:
- (id)initWithLatitude:(CLLocationDegrees)latitude longitude:(CLLocationDegrees)longitude
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With