Allow users to specify a class for each way
This adds the ability to mark ways with a user-defined class in the profile. This class information will be included in the response as property of the RouteStep object.
This commit is contained in:
committed by
Patrick Niklaus
parent
d52d530cbe
commit
44739f2dc3
@@ -342,6 +342,10 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context)
|
||||
&ExtractionWay::weight,
|
||||
"road_classification",
|
||||
&ExtractionWay::road_classification,
|
||||
"forward_classes",
|
||||
&ExtractionWay::forward_classes,
|
||||
"backward_classes",
|
||||
&ExtractionWay::backward_classes,
|
||||
"forward_mode",
|
||||
sol::property([](const ExtractionWay &way) { return way.forward_travel_mode; },
|
||||
[](ExtractionWay &way, TravelMode mode) { way.forward_travel_mode = mode; }),
|
||||
|
||||
Reference in New Issue
Block a user