0

Looking for a solution for measuring the straight line distance between two addresses using Google maps API, not the driving distance.

Jim
  • 63
  • 1
  • 2
  • 7

1 Answers1

2

First use google map geocoding API to find the lat/lng of your adresses:

Google Map geocoding API

Then calculate distances between those two points using Harvesine formula

Here is an example of the Haversine formula injs on a SO post

m.nachury
  • 972
  • 8
  • 23