如何计算在两个位置之间完成路径所需的时间? [英] How to calculate time required to complete the path in between two locations?

查看:89
本文介绍了如何计算在两个位置之间完成路径所需的时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想计算在两个位置之间完成路径所需的时间,就像在Maps应用程序中一样,如果您在两个位置找到路径,那么它也会显示完成它所需的估计时间。



请给我建议。



预先致谢。

Google路线API 解决方案

/ a>您将获得旅行的持续时间作为返回路线的一部分。您只需指定是否应计算步行,骑自行车或驾车。

I want to calculate the time require to complete path in between two location as like in Maps application in which if you will find the path in two location then it will also show you the estimated time required to complete it.

Please suggest me regarding it.

Thanks in advance.

解决方案

If you use the Google Directions API you will be provided with a duration for the trip as part of the returned route. All you have to do is specify whether it should calculate for walking, bicycling or driving.

这篇关于如何计算在两个位置之间完成路径所需的时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆