Skip to content

GetRouteRange not working when TravelMode is specified #31

@martinmedia-github

Description

@martinmedia-github

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:

RouteRangeRequest routeRangeRequest = new RouteRangeRequest()
{
        Query = "0....,0.....", //(whatever lat,lon : no space here)
        TimeBudgetInSec = "7200",
        TravelMode = TravelMode.Car, //using the provided enum
};

var routeRangeResponse = await _azureMapsService.GetRouteRange(routeRangeRequest).ConfigureAwait(continueOnCapturedContext: false);

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions