Distance Matrix Duration vs. Route Duration RRS feed

  • Question

  • Hi! I have been trying to test the Bing Maps Distance Matrix method to retrieve a set of travel times from a single start point to 2 end points. I have created an API key and have constructed a test URL. At first, I noticed that the travel times (durations) were always the same, which according to the documentation suggests that I need to provide the "startTime" parameter.

    Unfortunately, the durations are WAY off when compared to performing a basic route calculation. I have compared the durations to a simple route request via the API as well as the end user Bing Maps web site. I have a feeling that it has something to do with the "startTime" parameter, but I can't figure out how to debug this issue.

    The documentation uses an ISO 8601 date format as an example. I tried providing the following "startTime" parameter: "2018-09-13T18:30:00-04:00," which translates to Sep 13, 2018, 6:30PM in the America/New_York (US Eastern) timezone. The API appears to decode the given start time and returns a unix time stamp that translate to the proper UTC time, but has an offset of "-0700." 

    I tried to manually correct the problem in test by simply adding 3 hours (offset 4 compared to the offset 7 returned) to the ISO 8601 time stamp, and that appeared to return the correct unix timestamp for the Eastern timezone. However, the duration is still significantly different than a basic route calculation.

    To provide some clarity on the differences, a simple route request will return a travel time of 1 hour with real-time traffic. However, the distance matrix will return 25 minutes.

    Am I doing something wrong when querying the distance matrix API? Or does the distance matrix not support live traffic, even with the "startTime" parameter?

    Finally, here is an example URL:,-84.369046&destinations=33.640006,-84.444595;33.775577,-84.295993&travelMode=driving&distanceUnit=mi&startTime=2018-09-13T21:30:00-04:00&key=

    Thank you for your time.

    Thursday, September 13, 2018 11:40 PM

All replies

  • Hi Amar,

    I have forwarded this thread to the team in charge of distance Matrix and they are look at it now.



    Saturday, September 15, 2018 5:22 AM
  • DistanceMatrix doesn't support live traffic. If you input 'startTime' parameter, it will try to predicate the traffic condition based on historical traffic patterns. There will be differences between live traffic and predication, especially under heavy traffic condition. So if you need to get the real time route with traffic, please use normal route request. 
    Thursday, September 20, 2018 6:00 PM