From 91170eda23a75bf05917423a4041c99bdc6f8198 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= <skunk@xover.mud.at>
Date: Sat, 9 May 2020 07:03:20 +0200
Subject: [PATCH] cycle_directions-pattern: improve support for cycleway:left
 and cycleway:right

---
 cycle_directions-pattern.json | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/cycle_directions-pattern.json b/cycle_directions-pattern.json
index d2da7b4..96c95a3 100644
--- a/cycle_directions-pattern.json
+++ b/cycle_directions-pattern.json
@@ -41,16 +41,16 @@
         "style:highlight": null,
         "style:left": {
             "width": "0",
-            "pattern": "{% if tags.cycleway in [ 'opposite', 'opposite_lane', 'opposite_track' ] %}arrowHead{% endif %}",
+            "pattern": "{% if tags.cycleway in [ 'opposite', 'opposite_lane', 'opposite_track' ] or attribute(tags, 'cycleway:left') in [ 'opposite', 'opposite_lane', 'opposite_track' ] or attribute(tags, 'cycleway:right') in [ 'opposite', 'opposite_lane', 'opposite_track' ] %}arrowHead{% endif %}",
             "pattern-offset": "0",
             "pattern-repeat": "25",
             "pattern-polygon": "true",
             "pattern-pixelSize": "5",
             "pattern-path-color": [
-                "{% if tags.oneway in [ 'yes', '1' ] and tags.cycleway in [ 'opposite_lane', 'opposite' ] %}",
-                "#00ff00",
-                "{% elseif tags.oneway in [ 'yes', '1' ] and tags.cycleway in [ 'opposite_track' ] %}",
+                "{% if tags.oneway in [ 'yes', '1' ] and (tags.cycleway in [ 'opposite_track' ] or attribute(tags, 'cycleway:left') in [ 'opposite_track' ] or attribute(tags, 'cycleway:right') in [ 'opposite_track' ]) %}",
                 "#00af00",
+                "{% elseif tags.oneway in [ 'yes', '1' ] and (tags.cycleway in [ 'opposite_lane', 'opposite' ] or attribute(tags, 'cycleway:left') in [ 'opposite', 'opposite_lane' ] or attribute(tags, 'cycleway:right') in [ 'opposite', 'opposite_lane' ]) %}",
+                "#00ff00",
                 "{% endif %}"
             ],
             "pattern-path-fillOpacity": "1",