0

I have latitude and longitude of two cities. Is there any free option to calculate the travel distance between these cities using cartography?

At the moment, I implemented the Haversine formula for computing the great-circle distance. Then I multiply the distance by the correction factor (e.g. 0.7 - measured empirically).

This approach gives a quick approximation. But how can I do the same thing using a real cartography?

Klausos Klausos
  • 15,308
  • 51
  • 135
  • 217

1 Answers1

0

You may e.g. use the Distance Matrix API

Sample-Request(driving-distance from paris to rome)

https://maps.googleapis.com/maps/api/distancematrix/json?origins=paris&destinations=rome&mode=driving

Dr.Molle
  • 116,463
  • 16
  • 195
  • 201