add tunnel as a class in lua (#4812)
This commit is contained in:
+1
-1
@@ -104,7 +104,7 @@ function setup()
|
||||
},
|
||||
|
||||
classes = Sequence {
|
||||
'toll', 'motorway', 'ferry', 'restricted'
|
||||
'toll', 'motorway', 'ferry', 'restricted', 'tunnel'
|
||||
},
|
||||
|
||||
-- classes to support for exclude flags
|
||||
|
||||
@@ -283,6 +283,12 @@ end
|
||||
function WayHandlers.classes(profile,way,result,data)
|
||||
local forward_toll, backward_toll = Tags.get_forward_backward_by_key(way, data, "toll")
|
||||
local forward_route, backward_route = Tags.get_forward_backward_by_key(way, data, "route")
|
||||
local tunnel = way:get_value_by_key("tunnel")
|
||||
|
||||
if tunnel and tunnel ~= "no" then
|
||||
result.forward_classes["tunnel"] = true
|
||||
result.backward_classes["tunnel"] = true
|
||||
end
|
||||
|
||||
if forward_toll == "yes" then
|
||||
result.forward_classes["toll"] = true
|
||||
|
||||
Reference in New Issue
Block a user