Route API not work

bala autade 1 Reputation point
2023-02-23T06:36:23.1333333+00:00

 Hi Team,

We are trying to used one of your API (https://dev.virtualearth.net/REST/V1/Routes/Driving) to get TravelDistance and TravelTime between two waypoints. We have got results for different waypoint pairs, but however we have found that the travelDuration and travelDurationTraffic property have incorrect data with in API response. Usually the value of travelDurationTraffic is greater than the value of travelDuration, but in our response we have found exact opposite response for the same. Please find the below response that we have got from same API.

 

1. 

  1. W0. 42.891133, -93.195211
    W1: 43.447554, -93.210048
    travelDuration: 3368
    travelDurationTraffic: 3219
    Request URL: [https://dev.virtualearth.net/REST/V1/Routes/Driving?wp.0=42.891133,%20-93.195211&wp.1=43.447554,%20-93.210048&travelMode=Driving&optimize=time&DistanceUnit=Mile&routeAttributes=excludeItinerary&timeType=Departure&ThuFeb%2023%202023%2011:27:20%20GMT+0530%20(India%20Standard%20Time)&key=YOUR_BING_KEY]

User's image

  1. W0: 39.684274, -83.933978
    W1: 39.612918, -82.943264
    travelDuration: 4280
    travelDurationTraffic: 4172
    Request URL: Request URL: [https://dev.virtualearth.net/REST/V1/Routes/Driving?wp.0=39.684274,%20-83.933978&wp.1=39.612918,%20-82.943264&travelMode=Driving&optimize=time&DistanceUnit=Mile&routeAttributes=excludeItinerary&timeType=Departure&ThuFeb%2023%202023%2011:27:20%20GMT+0530%20(India%20Standard%20Time)&key=YOUR_BING_KEY]

User's image

3

  1. W0: 40.715072, -73.696107
    W1: 40.905952, -72.667739
    travelDuration: 4206
    travelDurationTraffic: 4114

Request URL: [https://dev.virtualearth.net/REST/V1/Routes/Driving?wp.0=40.715072,%20-73.696107&wp.1=40.905952,%20-72.667739&travelMode=Driving&optimize=time&DistanceUnit=Mile&routeAttributes=excludeItinerary&timeType=Departure&ThuFeb%2023%202023%2011:27:20%20GMT+0530%20(India%20Standard%20Time)&key=YOUR_BING_KEY]

 

User's image

Can you please help me in the above issue. Waiting for your reply.

Thanks!

 

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
800 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AshokPeddakotla-MSFT 35,941 Reputation points
    2023-02-28T15:46:41.9033333+00:00

    bala autade We have checked this internally and below is an update from our team.

    We have got results for different waypoint pairs, but however we have found that the travelDuration and travelDurationTraffic property have incorrect data with in API response. Usually the value of travelDurationTraffic is greater than the value of travelDuration, but in our response we have found exact opposite response for the same

    TravelDurationTraffic uses real-time traffic. So driving speed may be higher than base speed. Hence, the duration may be less than TravelDuration. Base speed may be different from the posted speed limit.

    The real traffic is faster than usual, so travelDurationwithTraffic is less.

    If you need further help in this matter, please comment in the below section and we are happy to discuss!


    If this answers your query, do click Accept Answer and Yes for this answer as helpful. And, if you have any further query do let us know by commenting in the below section.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.