An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
Hello Tom,
It looks like you’re looking to migrate your routing requests from Bing Maps REST API to Azure Maps. You have two options for making these requests in Azure Maps: a GET request and a POST request.
- GET Request
- Endpoint:
https://atlas.microsoft.com/route/directions/json?subscription-key={azureMapsKey}&api-version=1.0&query=-29.8819,30.9808:-29.6035,30.3796:-29.8819,30.9808&travelMode=car&traffic=true&computeTravelTimeFor=all
- When to use:\ This is similar to the Bing Maps Calculate Route API and works for simple scenarios.
- Limitations:\ This uses Route v1.0, which is deprecated and will be retired on March 31, 2028. It doesn’t support advanced features like custom route options or large waypoint sets.
- POST Request
- Endpoint:
https://atlas.microsoft.com/route/directions?api-version=2025-01-01&subscription-key={azureMapsKey}
- When to use:\ This is the recommended approach going forward. It uses GeoJSON in the request body and supports advanced scenarios such as:
- Multiple waypoints and via-waypoints
- Traffic-aware optimization
- Detailed outputs like route path and turn-by-turn itinerary
- Traffic-aware optimization
- Multiple waypoints and via-waypoints
Example code:
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": { "type": "Point", "coordinates": [30.9808, -29.8819] },
"properties": { "pointIndex": 0, "pointType": "waypoint" }
},
{
"type": "Feature",
"geometry": { "type": "Point", "coordinates": [30.3796, -29.6035] },
"properties": { "pointIndex": 1, "pointType": "waypoint" }
},
{
"type": "Feature",
"geometry": { "type": "Point", "coordinates": [30.9808, -29.8819] },
"properties": { "pointIndex": 2, "pointType": "waypoint" }
}
],
"travelMode": "driving",
"optimizeRoute": "fastestWithTraffic",
"routeOutputOptions": ["routePath","itinerary"]
}
I would suggest you to use the POST request with api-version=2025-01-01. It’s future-proof, supports complex routing, and aligns with Azure Maps’ latest standards.
Additional Tips
- Ensure coordinates are in [longitude, latitude] order (your sample is correct).
- Set
Content-Type: application/geo+jsonand optionallyAccept-Languagefor localized instructions. - For traffic-aware routes, include
"optimizeRoute": "fastestWithTraffic". - Docs:
I hope this helps you with your migration!
Thank you!