Skip to content

Commit 26c63a4

Browse files
committed
Updates
1 parent 24ffe3e commit 26c63a4

File tree

4 files changed

+41
-25
lines changed

4 files changed

+41
-25
lines changed

articles/azure-maps/itinerary-optimization-service.md

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -78,31 +78,47 @@ Matrix size = 5 origins x 5 destinations = 25
7878
The Route Matrix POST request:
7979

8080
```html
81-
https://atlas.microsoft.com/route/matrix/json?api-version=2025-01-01&routeType=shortest
81+
https://atlas.microsoft.com/route/matrix?api-version=2025-01-01&routeType=shortest&subscription-key={Your-Azure-Maps-Subscription-key}
8282
```
8383

8484
```json
8585
{
86-
"origins": {
87-
"type": "MultiPoint",
88-
"coordinates": [
89-
[4.85106, 52.36006], //restaurant or depot
90-
[4.85056, 52.36187], //delivery location 1
91-
[4.85003, 52.36241], //delivery location 2
92-
[4.42937, 52.50931], //delivery location 3
93-
[4.42940, 52.50843] //delivery location 4
94-
]
95-
},
96-
"destinations": {
97-
"type": "MultiPoint",
98-
[4.85106, 52.36006], //restaurant or depot
99-
[4.85056, 52.36187], //delivery location 1
100-
[4.85003, 52.36241], //delivery location 2
101-
[4.42937, 52.50931], //delivery location 3
102-
[4.42940, 52.50843] //delivery location 4
103-
]
104-
}
105-
}
86+
"type": "FeatureCollection",
87+
"features": [
88+
{
89+
"type": "Feature",
90+
"geometry": {
91+
"type": "MultiPoint",
92+
"coordinates": [
93+
[4.85106, 52.36006], //restaurant or depot
94+
[4.85056, 52.36187], //delivery location 1
95+
[4.85003, 52.36241], //delivery location 2
96+
[4.42937, 52.50931], //delivery location 3
97+
[4.42940, 52.50843] //delivery location 4
98+
]
99+
},
100+
"properties": {
101+
"pointType": "origins"
102+
}
103+
},
104+
{
105+
"type": "Feature",
106+
"geometry": {
107+
"type": "MultiPoint",
108+
"coordinates": [
109+
[4.85106, 52.36006], //restaurant or depot
110+
[4.85056, 52.36187], //delivery location 1
111+
[4.85003, 52.36241], //delivery location 2
112+
[4.42937, 52.50931], //delivery location 3
113+
[4.42940, 52.50843] //delivery location 4
114+
]
115+
},
116+
"properties": {
117+
"pointType": "destinations"
118+
}
119+
}
120+
]
121+
}
106122
```
107123

108124
The Route Matrix response returns a 5x5 multi-dimensional array where each row represents the origins and columns represent the destinations. Use the field `travelTimeInSeconds` to get the time cost for each location pair. The time unit should be consistent across the solution. Once the preprocessing stage is complete, the order, depot, fleet info and the cost matrix, are sent over and imported to the cuOpt Server via API calls.

articles/azure-maps/map-route.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ const onload = () => {
256256

257257
// Send a request to the route API
258258
let url = "https://atlas.microsoft.com/route/directions/json?";
259-
url += "&api-version=2025-01-01";
259+
url += "&api-version=1.0";
260260
url +=
261261
"&query=" +
262262
startPoint.geometry.coordinates[1] +

articles/azure-maps/tutorial-prioritized-routes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ This section shows you how to use the Azure Maps Route service to get directions
231231
endPoint.geometry.coordinates[1] + "," +
232232
endPoint.geometry.coordinates[0];
233233
//Make a search route request for a truck vehicle type
234-
var truckRouteUrl = `https://atlas.microsoft.com/route/directions/json?api-version=2025-01-01&travelMode=truck&vehicleWidth=2&vehicleHeight=2&vehicleLength=5&vehicleLoadType=USHazmatClass2&query=${query}`;
234+
var truckRouteUrl = `https://atlas.microsoft.com/route/directions/json?api-version=1.0&travelMode=truck&vehicleWidth=2&vehicleHeight=2&vehicleLength=5&vehicleLoadType=USHazmatClass2&query=${query}`;
235235
fetch(truckRouteUrl, {
236236
headers: {
237237
"Subscription-Key": map.authentication.getToken()
@@ -275,7 +275,7 @@ This section shows you how to use the Azure Maps Route service to get directions
275275
2. Next, append the following JavaScript code to create a route for a car.
276276

277277
```JavaScript
278-
var carRouteUrl = `https://atlas.microsoft.com/route/directions/json?api-version=2025-01-01&query=${query}`;
278+
var carRouteUrl = `https://atlas.microsoft.com/route/directions/json?api-version=1.0&query=${query}`;
279279
fetch(carRouteUrl, {
280280
headers: {
281281
"Subscription-Key": map.authentication.getToken()

articles/azure-maps/tutorial-route-location.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ This section shows you how to use the Azure Maps Route Directions API to get rou
205205
startPoint.geometry.coordinates[0] + ":" +
206206
endPoint.geometry.coordinates[1] + "," +
207207
endPoint.geometry.coordinates[0];
208-
var url = `https://atlas.microsoft.com/route/directions/json?api-version=2025-01-01&query=${query}`;
208+
var url = `https://atlas.microsoft.com/route/directions/json?api-version=1.0&query=${query}`;
209209

210210
//Make a search route request
211211
fetch(url, {

0 commit comments

Comments
 (0)