I'm able to reproduce this issue. It looks like there may be an issue in the underlying TomTom route service that Azure Maps uses. Azure Maps is working on bring over the Bing Maps route service in the near future, which would address this issue.
How to fix Azure giving direction route different from BING, using route directions with ferry ?
I´m having an issue using Route Directions API to obtain the distance between these 2 points below:
Point A: -12.972029,-38.514056
Point B: -12.962193,-38.609279
When using BING Maps web version, it gives me the right answer, calculating distance from A to B and from B to A (22.6 km and 23.4 km or something close to this).
However, when using the Route Directions API, with default parameters, it returns a response of:
A to B: 232 km (incorrect) and B to A: 23,4 km (correct)
There´s a ferry in this route, so I believe Azure API is having a issue when calculating the distance in one-way and in the other the distance is ok.
I´ve tried different parameters but the response is incorrect, always.
I´d like to state that I don´t want to avoid the ferry, I want to use it, as given in Bing Maps normal results.
2 answers
Sort by: Most helpful
-
rbrundritt 18,591 Reputation points Microsoft Employee
2024-08-21T16:23:55.3833333+00:00 -
Faraz Siddiqui 90 Reputation points Microsoft Employee
2024-08-30T03:02:55.86+00:00 Thank you for reporting this. I can see that the Route Directions v1 API is not returning the ferry route. We will look into this further.
We have a new Route Directions service in public preview that uses the Bing Routing backend, and it returns the ferry route as the Bing Maps.
API documentation - https://video2.skills-academy.com/en-us/rest/api/maps/route/post-directions?view=rest-maps-2023-10-01-preview&tabs=HTTP
Request
POST https://atlas.microsoft.com/route/directions?api-version=2023-10-01-preview
{ "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": { "coordinates": [ -38.514056,-12.972029 ], "type": "Point" }, "properties": { "pointIndex": 0, "pointType": "waypoint" } }, { "type": "Feature", "geometry": { "coordinates": [ -38.609279,-12.962193 ], "type": "Point" }, "properties": { "pointIndex": 1, "pointType": "waypoint" } } ], "routeOutputOptions": [ "routepath" ] }