문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top