Clarification on Azure Maps Route Directions API – Inconsistent Routing Results for Australia

Nilesh Khonde 85 Reputation points
2025-10-13T12:28:11.35+00:00

Hi team,

I am using the Azure Maps Route Directions API to calculate driving routes between two waypoints. I’ve noticed that when I use coordinates from Australia, I consistently get errors or undefined responses, whereas the same API works correctly for other regions.For example, when I use the v1.0 Directions API:

https://atlas.microsoft.com/route/directions/json?api-version=1.0&query=-25.874568266795862,133.0222229003906:-27.01891,136.08636&routeRepresentation=polyline&instructionsType=text&language=en-US&travelMode=car&computeBestOrder=true&routeType=fastest

I get the following error response:

{
  "error": {
    "code": "400 BadRequest",
    "message": "Engine error while executing route request: MAP_MATCHING_FAILURE: Origin (-25.8746, 133.022)"
  }
}

I also tried the newer v2025-01-01 API endpoint with the following POST body:

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [133.0222229003906, -25.874568266795862]
      },
      "properties": {
        "pointIndex": 0,
        "pointType": "waypoint"
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [136.08636, -27.01891]
      },
      "properties": {
        "pointIndex": 1,
        "pointType": "waypoint"
      }
    }
  ],
  "optimizeRoute": "fastestWithTraffic",
  "routeOutputOptions": ["routePath"],
  "maxRouteCount": 1,
  "travelMode": "driving"
}

And received this response:

{
  "error": {
    "code": "BadRequest",
    "message": "No routable road could be found near one or more specified points."
  }
}

When I perform the same type of request for European coordinates, it works fine and returns the expected route path.

So I wanted to confirm —

  • Is this expected behavior for Australian coordinates (perhaps due to limited road network data in certain regions)?
  • Or is there any specific way to handle such cases or adjust parameters (e.g., tolerance, snapping, map view) to get valid route results in these regions?

Appreciate any clarification or guidance on this.

Thank you,

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

2 answers

Sort by: Most helpful
  1. IoTGirl 3,811 Reputation points Microsoft Employee Moderator
    2025-10-14T06:07:44.1266667+00:00

    Hi Nilesh Khonde,

    You are correct! Our routing engine will not "route" to a place with no roads. I can view the co-ordinate on both a Bing Map and an Azure Map but I see no roads reaching that location so there is no method to route you there.Azure Maps Feedback You would need to find the closest navigable co-ordinate and use that for your route call.

    This is "By Design" as we do not want to suggest routes to places that can't be reached but if you are just looking for distances, you can use spatial math to convert the difference in the co-ordinates to approximate the "as the crow flies" distance. You an even build such a tool using Azure Maps. Try Azure Maps Measuring sample by sliding the map over to Australia and using the line tool to click in different locations. The measure of the line will apear in the top left corner.

    Sincerely, IoTGirl

    1 person found this answer helpful.
    0 comments No comments

  2. Faraz Siddiqui 425 Reputation points Microsoft Employee
    2025-10-14T23:17:49.3966667+00:00

    Hi Nilesh,

    To add to @IoTGirl 's response, in this case since there was no routable road near or between the provided coordinates, the Directions API could not resolve it. The Directions API tries to snap every point to nearby road segments, but in this case the points were outside the snapping tolerance. You could use Azure Maps Search to geocode your addresses or reverse geocode your points based on your source of data and use the routable coordinate before calling the Directions API but if there isn't a routable road nearby, it will not be included in the response.

    1 person found this answer helpful.
    0 comments No comments

Your answer

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