Search code examples
directionsazure-maps

Azure Maps Directions Service bad request with bicycle


I'm facing a strange issue with direction service in azure maps.

When I make this request with car in travel mode :

https://atlas.microsoft.com/route/directions/json?subscription-key={my-api-key}&api-version=1.0&query=48.81532,2.34954:52.31281,4.94103&language=fr-FR&computeTravelTimeFor=all&travelMode=car&arriveAt=2018-10-30T09:50:00-00:00

I got a good response with a proper json, but I make the same request with bicycle travel mode :

https://atlas.microsoft.com/route/directions/json?subscription-key={my-api-key}&api-version=1.0&query=48.81532,2.34954:52.31281,4.94103&language=fr-FR&computeTravelTimeFor=all&travelMode=bicycle&arriveAt=2018-10-30T09:50:00-00:00

I get the following error :

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

I can't figure out what makes this error


Solution

  • I changed the arriveAt time to 2018-10-31T09:50:00-00:00 and it works. Perhaps biking takes so long that it's impossible to arrive at the destination by the specified arriveAt time.