Duration_in_traffic less than duration in google Distance Matrix API

▼魔方 西西 提交于 2019-12-04 04:06:59

Note: The durationInTraffic field is now deprecated. It was previously the recommended way for Google Maps API for Work customers to specify whether the result should include a duration that takes into account current traffic conditions. You should now use the drivingOptions field instead.

Duration seems to take an average of durations at different times/from historic data, while duration_in_traffic takes the given departure time (and live traffic) into account. So the route takes 7 hours 1 min in average, but with your given time it only takes you 6 hours 42 mins from Hamburg to Garching.

I don't know if Google has that detailed data, but it could be that during the day a part of the highway is most of the times limited to 60 km/h because of dense traffic, while your travel time is around 23:00 and due to that you are allowed to drive 120 km/h.

There are also the three values for traffic_model: best_guess, pessimistic and optimistic which can influence the duration_in_traffic value.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!