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");

It's a workaround, can you check this?

Re: Error on OpenRouteServiceExample


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.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.