0

I am new at Google Maps. I want to the get distance from one place to another place and plot it on a map.

e.g: Place1 and Place2 Distance - xxx Km (xx miles) and plot it on map.

Please take a look.

dda
  • 6,030
  • 2
  • 25
  • 34
Amit Kumar
  • 1,367
  • 3
  • 13
  • 24

1 Answers1

2

Use the geometry library computeDistanceBetween() function. If you don't have the coordinates, use the Geocoder to get them.

Example (based off of the example in the documentation)

geocodezip
  • 158,664
  • 13
  • 220
  • 245