I am developing an iOS app where I need to get the walking route distance between two locations.
I have used CoreLocation API
- (CLLocationDistance)distanceFromLocation:(const CLLocation *)location
As per the documentation This method measures the distance between the two locations by tracing a line between them that follows the curvature of the Earth.
The distance it gave was different from the the one which shown in the iOS map app (after converting to miles) as shown in the figure.
I want to get the walking route distance between two locations which we gets in the map app inside my app. is there any API to get this distance.
Could anyone please help me to achieve this.