From cf4037b94c27fa97ddd52aa643e54940fc8bfff9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Sun, 1 Dec 2024 10:52:08 +0100 Subject: [PATCH] cycleway_types: improve rendering of oneway --- cycleway_types.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cycleway_types.yaml b/cycleway_types.yaml index dcb1405..57697eb 100644 --- a/cycleway_types.yaml +++ b/cycleway_types.yaml @@ -23,6 +23,13 @@ feature: {% set type = 'bicycle_road' %} {% endif %} + {% set mainOneway = tags.oneway %} + {% if mainOneway == 'yes' %} + {% set mainOneway = 1 %} + {% elseif mainOneway == 'no' %} + {% set mainOneway = 0 %} + {% endif %} + {% set oneway = attribute(tags, 'oneway:bicycle')|default(tags.oneway) %} {% if oneway == 'yes' %} {% set oneway = 1 %} @@ -80,6 +87,12 @@ feature: {% set rightOneway = 0 %} {% endif %} + {% if mainOneway and ((not rightCycle and mainOneway == rightOneway) or (not leftCycle and mainOneway == leftOneway)) %} + {% set oneway = mainOneway %} + {% elseif mainOneway == oneway and ((rightCycle and mainOneway == rightOneway) or (leftCycle and mainOneway == leftOneway)) %} + {% set oneway = 0 %} + {% endif %} + styles: | {% if tags.bridge and tags.bridge != 'no' %} bridge_outer,bridge_inner,