-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GetRouteRange not working when TravelMode is specified #31
Comments
There is some work done in the dev branch. I will see if I can realease a new version within a week or so. |
We are having the same issue using 6.0.0.0 but on the GetRouteDirections call. We cannot upgrade to 7.1 as we are not able to use .Net5 yet. We have just left the TravelMode blank so it defaults to "car" in Azure and returns us results without erroring. However this is only a temporary fix as our clients are likely to want to specify the TravelMode. |
Hi RedBlack, The issue is just case-sensitivity in the TravelMode.cs class As a workaround you could:
|
Hi Thanks for the workaround. It is working, it just means we have to maintain our own version of this for now. FYI - These where the enums that I had to change: RouteType, TravelMode, VehicleEngineType |
Hi, I'm using 5.0.3 version.
I want to use the GetRouteRange by specifying the "TravelMode" parameter, which is took from an enum value (which is great!).
but I never managed to make it work. As soon I specify a travel mode, it return a 400 bad request: "One or more parameters were incorrectly specified or are mutually exclusive"
Example of my code:
I tried it in postman, direct with the Microsoft Endpoint
(https ://atlas.microsoft.com/route/range/json?api-version=1.0&TravelMode=car&timeBudgetInSec=7200...)
and it works when I put "car" (all lowercase), but if I put "Car" with a capital "C", I get the same kind of error.
I tried with a different travel mode with no luck, still the same issue.
Fortunately I must only use "car" travel mode for now and it is the default when it is not specified (according to Microsoft AzureMaps documentation).
So aside that it seems to pass the enum name in a case-sensitive way -- with the capital "C" for Car in my case, I don't know what else it could be.
Thank you for you help.
The text was updated successfully, but these errors were encountered: