Search code examples
azureazure-maps

Azure Maps Route Directions Error Returns Bad Request


Can anyone possible tell me what is wrong with this lat,lng: 54.575972,-1.235028 google maps says it's ok! ref: https://www.google.com/maps/place/54%C2%B034'33.5%22N+1%C2%B014'06.1%22W/@54.5759722,-1.2372165,17z/data=!3m1!4b1!4m5!3m4!1s0x0:0x0!8m2!3d54.575972!4d-1.235028

Azure API Returns Bad Request!

https://atlas.microsoft.com/route/directions/json?subscription-key=XXXXXXXXXXXXXXXXXXXXX&api-version=1.0&query=52.042250,-0.780480:54.575972,-1.235028

Message:

{
  "error": {
    "code": "400 BadRequest",
    "message": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive."
  }
}

Solution

  • The team found the issue. The road segment that the coordinate was snapping to was classified as a walking road, and thus the routing service wasn't able to calculate the route. The road has been reclassified and should be updated in the platform within the next couple of weeks. Thanks for the feedback.