Search code examples
node.jsgeolocationgeospatial

Best way to find distance between two geopoints(lats, longs) in node.js


Can anyone pls tell me what is the best way to find distance between two geopoints (lats, longs) in node.js . If there is any good node js library pls tell me. Also I dont want to find the straight line path i want to find the possible driving path between the locations.

Thank you in Advance


Solution

  • Ok, according to the wording of your last, you need a wrapper to services like Google Distance Matrix API or The Google Directions API. For example: Google Distance Matrix API for Node.js: