Reputation: 158
Can anyone help me "How to calculate distance between two places in MAP(CLLocation).Tell the delegates,methods etc to be used .
Thanks in advance,
BrightRaj
Upvotes: 1
Views: 107
Reputation: 54141
You can use this method in CLLocation
that takes another CLLocation object and returns the distance in meters:
- (CLLocationDistance)distanceFromLocation:(const CLLocation *)location
Be aware that it's available only in iOS ≥3.2. If you wanna target older iOS versions, use
- (CLLocationDistance)getDistanceFrom:(const CLLocation *)location
This method is marked as deprecated and will disappear at some time in the future.
Upvotes: 0
Reputation: 11450
Does this help?
distanceFromLocation - Calculate distance between two points
Upvotes: 1