How to fix Azure giving direction route different from BING, using route directions with ferry ?

Fabio 0 Reputation points
2024-08-20T17:14:54.4033333+00:00

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.

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

2 answers

Sort by: Most helpful
  1. rbrundritt 18,591 Reputation points Microsoft Employee
    2024-08-21T16:23:55.3833333+00:00

    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.

    1 person found this answer helpful.
    0 comments No comments

  2. 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"
      ]
    
    }
    
    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.