Topic: Error on OpenRouteServiceExample

I'm trying to use the OpenRouteService, when I attach the script I get this error:
InvalidCastException: Specified cast is not valid.
OnlineMapsReflectionHelper.GetEnumDescription (System.Enum value) (at Assets/Infinity Code/Online maps/Scripts/Core/OnlineMapsReflectionHelper.cs:56)
It look like the p.profile does not send the correct name for the profile (drivingCar instead of driving-car) from OnlineMapsOpenRouteServiceDirections.
I tried to do not Append the call to OnlineMapsReflectionHelper from OnlineMapsOpenRouteServiceDirections(double[] coordinates, Params p) and Append instead a string with the correct value and it works:

//builder.Append(p != null ? OnlineMapsReflectionHelper.GetEnumDescription(p.profile) : "driving-car");
builder.Append("foot-walking");

It's a workaround, can you check this?

Re: Error on OpenRouteServiceExample

Hello.

Thanks for the bug report.
The problem has been fixed.
The new version is already available through the built-in update system.

Kind Regards,
Infinity Code Team.

uContext is Editor PowerPack (more than 40 tools) that take your workflow in Unity Editor to a next level, simplifies working with content, adds new features, corrects and improves the editor’s built-in behaviors. Click here to download uContext Basic for free.