I am trying to get a driving distance to display next to my search results for a user database that I have collected the lat/long coordinates for. I have found some examples that offer a ‘straight’ line approach, but not really the result I am looking for. A little more background, I have several employees located around me, and I am trying to match their location to the customer’s location easily, so the distance results will change regularly. I am programming in PHP.
Asked
Active
Viewed 71 times
1 Answers
1
You'll want to research reverse geocoding APIs (such as this one) to turn the coordinates back to an address (which most directions based routing APIs like to have) as well as routing APIs (such as this driving directions API).
As far as making all of the requests and utilizing these APIs - you can perform these tasks using php and cURL.

AndrewPK
- 6,100
- 3
- 32
- 36
-
The Google APIs term of use require displaying a google map. This will work for him as long as there is some Google map displayed. The poster could add a link next to the driving distance to open a map. – Andrew - OpenGeoCode Nov 28 '13 at 18:20