문제

How to calculate the time taken to travel between two points in the map view.

도움이 되었습니까?

해결책

Measured Travel Time

You can only do that if you have the timestamp stored together with the coordinates of the points. Other solutions are unrealistic. If you have both timestamps, then it is simple to calculate the difference in number of seconds.

Convert both times to "timeSinceReferenceDate" and subtrac:

something like deltaSeconds = abs(t2 - t1);

Estimated Traveltime automotive

If you have only coordinates, and want to know the estimated travel time by using a car, you have to use a routing service, which calculates the route and time duration for your you.

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