You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Breaking this out from #4006 we need a way to set a user-defined class per edge and use this in the server. This will enable features like displaying when a route is using a toll road, or a private road.
API Changes
Lua profile
Instead of hard-coding specific classes for #4006 we want to keep this more general. This requires us to have an interface in the profiles to mark ways with true/false if they fall into that class.
This annotation, similar to speeds, would be per-segment along the route. I've described each segment using an array of strings, to support the case where a single segment belongs to multiple classes.
This would allow for correct rendering of various route sections if desired.
how will this work together with the mode, they are still separate flags?
for example, if the mode is ferry, i could potentially indicate 8 different types of ferry routes with the classes?
Breaking this out from #4006 we need a way to set a user-defined class per edge and use this in the server. This will enable features like displaying when a route is using a toll road, or a private road.
API Changes
Lua profile
Instead of hard-coding specific classes for #4006 we want to keep this more general. This requires us to have an interface in the profiles to mark ways with
true
/false
if they fall into that class.HTTP/node
We can expose this as a new property
classes
in theRouteStep
object, that is only there if there is class information for that step.classes
: An array of strings signifying the classes of the road as specified in the profile.Example:
The text was updated successfully, but these errors were encountered: