2

Possible Duplicate:
Calculate distance between two points in google maps V3

Which one is best method to calculate the distance between two points using Google Map V3 API?

  1. Using Google's Distance Matrix
  2. computeDistanceBetween() method which is defined in google.maps.geometry.spherical namespace.
Community
  • 1
  • 1
Tarun Gupta
  • 1,232
  • 2
  • 13
  • 26

1 Answers1

2

(#2) computeDistanceBetween() returns the straight line distance, to get the driving distance, use either (#1) the Distance Matrix or (#3) the Google Maps API v3 Directions Service, see the documentation for examples

reference

geocodezip
  • 158,664
  • 13
  • 220
  • 245