From fe8837e52e8bdd05bee86adccc3950db4506fa8c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= <skunk@xover.mud.at>
Date: Mon, 15 Jul 2024 07:55:27 +0200
Subject: [PATCH] cycleway_types: show cycleways with segregation

---
 cycleway_types.yaml | 83 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 83 insertions(+)
 create mode 100644 cycleway_types.yaml

diff --git a/cycleway_types.yaml b/cycleway_types.yaml
new file mode 100644
index 0000000..21c6ac2
--- /dev/null
+++ b/cycleway_types.yaml
@@ -0,0 +1,83 @@
+query:
+  (
+  way[highway=cycleway];
+  )
+feature:
+  styles: |
+    {% if tags.segregated %}
+    footway,
+    {% endif %}
+    default
+  style:
+    width: |
+      {% if tags.segregated %}
+      {{ tags.segregated == 'yes' ? 2 : 4 %}
+      {% else %}
+      4
+      {% endif %}
+
+    dashArray: |
+      {% if tags.segregated == 'no' %}
+      5,5
+      {% endif %}
+
+    lineCap: |
+      {% if tags.segregated == 'no' %}
+      butt
+      {% else %}
+      round
+      {% endif %}
+
+    color: |
+      {{ const.types.cycleway.color }}
+
+    offset: |
+      {% if tags.segregated == 'yes' %}
+      1.5 
+      {% endif %}
+
+  style:footway:
+    color: |
+      {{ const.types.footway.color }}
+
+    width: |
+      {% if tags.segregated %}
+      {{ tags.segregated == 'yes' ? 2 : 4 %}
+      {% else %}
+      4
+      {% endif %}
+
+    dashArray: |
+      {% if tags.segregated == 'no' %}
+      5,5
+      {% endif %}
+
+    dashOffset: 5
+
+    lineCap: |
+      {% if tags.segregated == 'no' %}
+      butt
+      {% else %}
+      round
+      {% endif %}
+
+    offset: |
+      {% if tags.segregated == 'yes' %}
+      -1.5
+      {% endif %}
+
+  description: |
+    {% if tags.segregated %}
+    {{ tagTrans('highway', 'cycleway segregated=' ~ tags.segregated) }}
+    {% elseif tags.highway %}
+    {{ tagTrans('highway', tags.highway) }}
+    {% endif %}
+
+  markerSymbol: ''
+
+const:
+  types:
+    cycleway:
+      color: '#007f00'
+    footway:
+      color: '#ff7f00'