Migrating from Bing Maps REST API Routing to Azure Maps

Tom 276 Reputation points
2025-08-13T16:05:40.23+00:00

I'm migrating from Bing Maps to Azure Maps. This will include moving to use the Azure Maps REST API.

I'm currently using https://dev.virtualearth.net/REST/v1/Routes?wp.0=-29.8819,30.9808&wp.1=-29.6035,30.3796&wp.2=-29.8819,30.9808&ra=routePath&key=. I use the itineraryItems provided in the response to provide data for calculations.

I have come across 2 different approaches in Azure Maps. The first is a GET request using the address 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

The second is a POST using the address https://atlas.microsoft.com/route/directions?api-version=2025-01-01&subscription-key=. The body of the request contains the following information.

{
        "type": "FeatureCollection",
        "features": [
            {
                "type": "Feature",
                "geometry": {
                    "coordinates": [
                        30.9808,
                        -29.8819
                    ],
                    "type": "Point"
                },
                "properties": {
                    "pointIndex": 0,
                    "pointType": "waypoint"
                }
            },
            {
                "type": "Feature",
                "geometry": {
                    "coordinates": [
                        30.3796,
                        -29.6035
                    ],
                    "type": "Point"
                },
                "properties": {
                    "pointIndex": 1,
                    "pointType": "Waypoint"
                }
            },
            {
                "type": "Feature",
                "geometry": {
                     "coordinates": [
                        30.9808,
                        -29.8819
                     ],
                     "type": "Point"
                 },
                 "properties": {
                     "pointIndex": 2,
                     "pointType": "Waypoint"
                 }
            }
        ],
        "routeOutputOptions": [
            "itinerary"
        ],
        "travelMode": "driving"       
    }

Which is the correct request to use?

Azure Maps
Azure Maps

An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.


Answer accepted by question author
Anonymous
2025-08-13T16:54:43.58+00:00

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.


  1. 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.

  1. 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

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


I hope this helps you with your migration!
Thank you!

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful

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.