In your request you are asking for the shortest route but most map platforms default to the fastest (fairly certain that's what Google Maps is set to on its webpage). Try setting routeType
to fastest
Time Difference when hitting route api in azure maps
Nilesh Khonde
60
Reputation points
Hi Guys,
I am using the Route API to get the time between two coordinates in Azure Maps.
The following is the API I am using:
https://atlas.microsoft.com/route/directions/json?api-version=1.0&query=47.45567,-122.28245:47.60323,-122.33028&travelMode=car&traffic=true&computeTravelTimeFor=all&routeType=shortest&maxAlternatives=0&subscription-key=
The following API gives me results that return time in seconds. For example, 1584 seconds is equivalent to 26.4 minutes. However, using the same coordinates in Google Maps results in 18 minutes
please find below screenshot.
so is there is any way which can help me to optimize the time given by the route by api.
any help will be deeply appreciated.
1 answer
Sort by: Most helpful
-
rbrundritt 18,266 Reputation points Microsoft Employee
2024-10-08T15:46:44.85+00:00