locked
Travel duration with traffic for given departure/arrival time RRS feed

  • Question

  • Hi, I'm looking to get travel durations for a given time based on departure/arrival times and traffic conditions.

    I've tried using the Routes API services with dateTime=<departure_time> and timeType=Departure, but the resulting 'travelDurationTraffic' still reflects current traffic conditions. 

    example: 

    request 1: (12:00 PM)

    dev.virtualearth.net/REST/V1/Routes/Driving/?dt=2015-05-14T16:00:40.339Z&du=mi&ra=routeSummariesOnly&tt=Departure&wp.0=<WAYPOINT_0>&wp.1=<WAYPOINT_1>&key=<API_KEY>

       ->   travelDurationTraffic: 1264

    request 2: (5:00 PM)

    dev.virtualearth.net/REST/V1/Routes/Driving/?dt=2015-05-14T21:00:49.135Z&du=mi&ra=routeSummariesOnly&tt=Departure&wp.0=<WAYPOINT_0>&wp.1=<WAYPOINT_1>&key=<API_KEY>

      ->   travelDurationTraffic: 1264

    Is there any way to get travel durations with traffic for a given date and time?

    Thanks!

     
    Thursday, May 14, 2015 4:51 AM

Answers

  • The dateTime option is only for transit directions and not driving directions. Driving directions only calculate traffic based routes assuming you leave now and do not do future traffic predictions beyond predicting the expected traffic along a route that leaves now.

    http://rbrundritt.wordpress.com

    Thursday, May 14, 2015 4:13 PM

All replies

  • The dateTime option is only for transit directions and not driving directions. Driving directions only calculate traffic based routes assuming you leave now and do not do future traffic predictions beyond predicting the expected traffic along a route that leaves now.

    http://rbrundritt.wordpress.com

    Thursday, May 14, 2015 4:13 PM
  • I know this is an old answer, so maybe the documentation has changed since... but is still not working even though the docummentation says it should.  Should this be working now???

    https://msdn.microsoft.com/en-us/library/ff701717.aspx

    Required when the travel mode is Transit. The dateTime parameter identifies the desired transit time, such as arrival time or departure time. The transit time type is specified by the timeType parameter.

    Optional for Driving. When specified and the route is optimized for timeWithTraffic, predictive traffic data is used to calculate the best route for the specified date time.

    Tuesday, February 6, 2018 6:26 PM
  • This definitely works and always has. 

    [Blog] [twitter] [LinkedIn]

    Tuesday, February 6, 2018 7:13 PM