The DrivingSide
property in the route service generally is the side of the road you would typically drive on (e.g. right side in the USA, left side in the UK) and not the side of the road you are on when starting your route. The vehicleHeading
is an option of the request that you can pass in the direction the vehicle is pointing in degrees. This will then snap to the appropriate side of the road.
Azure Maps Route API - How to set DrivingSide a Left or Right
I am using Azure maps Route API - sample indicated below
https://atlas.microsoft.com/route/directions/json?api-version=1.0&subscription-key={subscriptionKey}&query...
The question is it looks like, the route information returned is always based on LEFT HAND Driving.
How to set this to return for Right hand Driving. I can see some property called drivingSide, but please guide me on how to set this in the API as a Query parameter so that I get the response route for Right hand driving.
One more question - If we set the country code say India, will it automatically take Driving Side as as Right hand side and calculate routes based on this ? If so, how to set the Country code while calling route API ?
Appreciate your response.
Thanks
-Mathew
1 answer
Sort by: Most helpful
-
rbrundritt 18,791 Reputation points Microsoft Employee
2024-05-06T14:56:40.1166667+00:00