谷歌方向 API 持续时间是否反映实时流量?

发布于 2025-01-08 09:16:33 字数 214 浏览 1 评论 0原文

I have been following android get duration from maps.google.com directions and I seem to be doing okay, but I have a question: does the duration returned in the JSON from google maps adjust for real time traffic?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

雪若未夕 2025-01-15 09:16:33

根据 google 路线 api 开发者文档上的定义:

  • 持续时间表示总时间这条腿的持续时间
  • duration_in_traffic表示这条腿的总持续时间,考虑到当前的交通状况,

我认为这意味着不,持续时间不会根据实时交通进行调整。

From the definitions on the google developers documentation for directions api :

  • duration indicates the total duration of this leg
  • duration_in_traffic indicates the total duration of this leg, taking into account current traffic conditions

I would take this to mean that no, duration doesn't not adjust for real time traffic.

清晨说晚安 2025-01-15 09:16:33

通过获取一天中不同时间的持续时间,可以凭经验确定问题的答案。我想你会发现它不是基于实时的。

该文档没有提及实时流量。虽然这还不是决定性的,但考虑实时交通状况将是一个妙招,并且很可能被包括在内。

It's possible to determine the answer to the question empirically by getting the duration at different times of day. I think you'll find it is not real-time based.

The documentation does not make mention of real-time traffic. While that's not conclusive, accounting for real-time traffic conditions would be rather a coup and highly likely to be included.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文