如何在 Bing Maps v7 API 中为路线添加时间?

How to add time to directions in Bing Maps v7 API?

我正尝试在 Bing Maps v7 API:

中完成此示例

Create Driving Route Example

我想做的是给例子加上一个开始时间,让每个方向都有你应该到达的时间。例如 08:00 从机场出发,08:15,32 英里右转,08:30 64 英里在酒店结束。

我已经搜索过文档,但找不到类似的内容。

我注意到方向上的某些距离会指定时间和距离。这是如何控制的?

如果这不可能,你能告诉我在哪里可以找到关于如何格式化每个方向和控制显示内容的文档吗?

Bing Maps V7 控件中的方向模块没有为行车路线获取未来日期时间的方法。然而,Bing Maps REST 路线服务确实支持这种驾驶路线。 REST 服务记录在此处:https://msdn.microsoft.com/en-us/library/ff701713.aspx You will want to use the dateTime parameter. The documentation says that this is require for transit, but doesn't highlight that this is also an option for driving. When set predictive traffic data is used to approximate the travel time. It won't tell you what time you will arrive somewhere, but will tell you how long it would take which you could easily add to your start time. If you want to use this with the JavaScript map control, information on how to use the REST routing service with Bing Maps V7 can be found here: https://msdn.microsoft.com/en-us/library/gg427607.aspx

Bing Maps V8 地图控件几周前刚刚作为 public 预览版发布。那里的方向模块将支持提供未来 date/times.

的能力