I've been using this toolkit to create route between multiple locations, but I have now noticed that if I specify a list of Waypoints in a RouteRequest that only contains two locations then the order of them (IE the starting point) is not respected.
Normally it respects the starting point but in this case it seems like it is choosing the second item as the starting point.
{
"copyright": "Copyright © 2018 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.",
"brandLogoUri": "http://dev.virtualearth.net/Branding/logo_powered_by.png",
"statusCode": 200,
"statusDescription": "OK",
"authenticationResultCode": "ValidCredentials",
"traceId": "ba2365db3a7345b8a446709f4b9441e3|HK20300156|7.7.0.0|HK20230323, HK20251119",
"resourceSets": [
{
"estimatedTotal": 1,
"resources": [
{
"id": "v69,h-823779366,i0,a0,cen-US,dAAAAAAAAAAA1,y0,s1,m1,o1,t4,w6X3ja89EPkCBsilXeG9YwA2~AjOI157RvpwSAADgAR4mDz8A0~RSA3dGggU3Q1~~~~v11,wfh04Z0RBPkCpMLYQ5G5YwA2~AjOI155RSKsSAADgASgNfD4B0~TmF2YXNvdGEgU3Q1~~~~v11,k1",
"distanceUnit": "kilometer",
"durationUnit": "Second",
"travelDistance": 2.452,
"travelDuration": 320.0,
"travelDurationTraffic": 481.0,
"trafficCongestion": "Heavy",
"trafficDataUsed": "None",
"routeLegs": [
{
"travelDistance": 2.452,
"travelDuration": 320.0,
"description": "E 7th St, N I-35",
"actualStart": {
"type": "Point",
"coordinates": [
30.268788,
-97.741721
]
},
"actualEnd": {
"type": "Point",
"coordinates": [
30.254879,
-97.732527
]
},
"itineraryItems": [
{
"compassDirection": "east",
"details": [
{
"compassDegrees": 105,
"maneuverType": "DepartStart",
"startPathIndices": [
0
],
"endPathIndices": [
1
],
"roadType": "Street",
"locationCodes": [
"112+13137"
],
"names": [
"E 7th St"
],
"mode": "Driving"
}
],
"exit": "",
"iconType": "Auto",
"instruction": {
"maneuverType": "DepartStart",
"text": "Depart E 7th St toward Brazos St"
},
"maneuverPoint": {
"type": "Point",
"coordinates": [
30.268788,
-97.741721
]
},
"sideOfStreet": "Unknown",
"tollZone": "",
"towardsRoadName": "Brazos St",
"transitTerminus": "",
"travelDistance": 0.71,
"travelDuration": 90.0,
"travelMode": "Driving"
},
{
"compassDirection": "south",
"details": [
{
"compassDegrees": 200,
"maneuverType": "TurnRight",
"startPathIndices": [
1
],
"endPathIndices": [
3
],
"roadType": "Arterial",
"locationCodes": [
"112-16864",
"112-16863",
"112-16862"
],
"names": [
"N I-35"
],
"mode": "Driving"
}
],
"exit": "",
"hints": [
{
"hintType": "Landmark",
"text": "Gulf on the corner"
}
],
"iconType": "Auto",
"instruction": {
"maneuverType": "TurnRight",
"text": "Turn right onto N I-35"
},
"maneuverPoint": {
"type": "Point",
"coordinates": [
30.26683,
-97.73467
]
},
"sideOfStreet": "Unknown",
"tollZone": "",
"transitTerminus": "",
"travelDistance": 0.959,
"travelDuration": 121.0,
"travelMode": "Driving"
},
{
"compassDirection": "south",
"details": [
{
"compassDegrees": 190,
"maneuverType": "KeepToStayLeft",
"startPathIndices": [
3
],
"endPathIndices": [
6
],
"roadType": "Arterial",
"locationCodes": [
"112-16862"
],
"names": [
"N I-35"
],
"mode": "Driving"
}
],
"exit": "",
"iconType": "Auto",
"instruction": {
"maneuverType": "KeepToStayLeft",
"text": "Keep left to stay on N I-35"
},
"maneuverPoint": {
"type": "Point",
"coordinates": [
30.25862,
-97.73772
]
},
"sideOfStreet": "Unknown",
"tollZone": "",
"transitTerminus": "",
"travelDistance": 0.131,
"travelDuration": 13.0,
"travelMode": "Driving"
},
{
"compassDirection": "east",
"details": [
{
"compassDegrees": 104,
"maneuverType": "TurnLeft",
"startPathIndices": [
6
],
"endPathIndices": [
8
],
"roadType": "Arterial",
"locationCodes": [
"112N17013",
"112-17013"
],
"names": [
"Holly St",
"River St"
],
"mode": "Driving"
}
],
"exit": "",
"iconType": "Auto",
"instruction": {
"maneuverType": "TurnLeft",
"text": "Turn left onto Holly St / River St"
},
"maneuverPoint": {
"type": "Point",
"coordinates": [
30.25745,
-97.73771
]
},
"sideOfStreet": "Unknown",
"tollZone": "",
"transitTerminus": "",
"travelDistance": 0.567,
"travelDuration": 81.0,
"travelMode": "Driving"
},
{
"compassDirection": "south",
"details": [
{
"compassDegrees": 194,
"maneuverType": "TurnRight",
"startPathIndices": [
8
],
"endPathIndices": [
10
],
"roadType": "Street",
"names": [
"Navasota St"
],
"mode": "Driving"
}
],
"exit": "",
"iconType": "Auto",
"instruction": {
"maneuverType": "TurnRight",
"text": "Turn right onto Navasota St"
},
"maneuverPoint": {
"type": "Point",
"coordinates": [
30.25559,
-97.73221
]
},
"sideOfStreet": "Unknown",
"tollZone": "",
"transitTerminus": "",
"travelDistance": 0.085,
"travelDuration": 14.0,
"travelMode": "Driving"
},
{
"compassDirection": "south",
"details": [
{
"compassDegrees": 194,
"maneuverType": "ArriveFinish",
"startPathIndices": [
10
],
"endPathIndices": [
10
],
"roadType": "Street",
"names": [
"Navasota St"
],
"mode": "Driving"
}
],
"exit": "",
"hints": [
{
"hintType": "PreviousIntersection",
"text": "The last intersection is Holly St"
},
{
"hintType": "NextIntersection",
"text": "If you reach Haskell St, you've gone too far"
}
],
"iconType": "Auto",
"instruction": {
"maneuverType": "ArriveFinish",
"text": "Arrive at Navasota St on the right"
},
"maneuverPoint": {
"type": "Point",
"coordinates": [
30.254879,
-97.732527
]
},
"sideOfStreet": "Right",
"tollZone": "",
"transitTerminus": "",
"travelMode": "Driving"
}
],
"routeSubLegs": [
{
"endWaypoint": {
"description": "Navasota St",
"locationIdentifier": "2|51|136|215|158|81|72|171|18|0|0|224|1|40|13|124|62|1|30.254879,-97.732527",
"routePathIndex": 10,
"type": "Point",
"coordinates": [
30.254879,
-97.732527
]
},
"startWaypoint": {
"description": "E 7th St",
"locationIdentifier": "2|51|136|215|158|209|190|156|18|0|0|224|1|30|38|15|63|0|30.268788,-97.741721",
"type": "Point",
"coordinates": [
30.268788,
-97.741721
]
},
"travelDistance": 2.452,
"travelDuration": 320.0
}
]
}
],
"routePath": {
"line": {
"type": "LineString",
"coordinates": [
[
30.268787,
-97.74172
],
[
30.26683,
-97.73467
],
[
30.266205,
-97.734906
],
[
30.25862,
-97.73772
],
[
30.258415,
-97.737755
],
[
30.25804,
-97.737799999999993
],
[
30.25745,
-97.73771
],
[
30.257406,
-97.737539
],
[
30.25559,
-97.73221
],
[
30.25544,
-97.73225
],
[
30.254879,
-97.732525999999993
]
]
},
"generalizations": [
]
},
"bbox": [
30.254879,
-97.741721,
30.268788,
-97.73221
]
}
]
}
]
}
Notice how the first route leg actual starting point is in fact the second waypoint....