From b057ef03cf874ad088bc0b81b28dba2bca038672 Mon Sep 17 00:00:00 2001 From: scarapella Date: Wed, 24 Dec 2025 15:17:09 +0100 Subject: [PATCH] Adding support for additional categories (tidal, intermittent, canoe:description etc.) and improving some formatting --- paddling_amenities.yaml | 205 ++++++++++++++++++++++++---------------- 1 file changed, 123 insertions(+), 82 deletions(-) diff --git a/paddling_amenities.yaml b/paddling_amenities.yaml index 112d341..f138994 100644 --- a/paddling_amenities.yaml +++ b/paddling_amenities.yaml @@ -52,12 +52,14 @@ feature: {% set informal_value = tags.informal %} {% endif %} - {% if tags.ice_skates and tags.ice_skates in ['no','private','discouraged','unknown'] %} - {% set restricted_access_value = tags.ice_skates %} + {% if tags.canoe and tags.canoe in ['no','private','discouraged','unknown'] %} + {% set restricted_access_value = tags.canoe %} + {% set restricted_canoe_value = tags.canoe %} + {% elseif tags.portage and tags.portage in ['no','private','discouraged','unknown'] %} + {% set restricted_access_value = tags.portage %} + {% set restricted_portage_value = tags.canoe %} {% elseif tags.access and tags.access in ['no','private','discouraged','unknown'] %} {% set restricted_access_value = tags.access %} - {% elseif type == 'way' and tags.waterway and tags.waterway != 'access_point' and tags.ice_skates and tags.ice_skates == 'kluning' %} - {% set restricted_access_value = tags.ice_skates %} {% endif %} title: |- {{ localizedTag(tags, 'name') }} @@ -74,91 +76,131 @@ feature: {% endif %} {{ tagTrans(key, value) }} body: |- - {% if key not in ['shop'] %} - markerSign: '{{ item[''sign''] | raw }}' markerSymbol: |- {% if item.symbol=='pointer' %} {% if restricted_access_value %} {{ markerPointer({ fillColor: const.marker.style.color_restricted }) }} - {% elseif informal_value %} - {{ markerPointer({ fillColor: const.marker.style.color_informal }) }} {% else %} {{ markerPointer({ fillColor: const.marker.style.color }) }} {% endif %} @@ -167,8 +209,6 @@ feature: {% if item.symbol=='pointer' %} {% if restricted_access_value %} {{ markerCircle({ fillColor: const.marker.style.color_restricted }) }} - {% elseif informal_value %} - {{ markerCircle({ fillColor: const.marker.style.color_informal }) }} {% else %} {{ markerCircle({ fillColor: const.marker.style.color }) }} {% endif %} @@ -189,21 +229,22 @@ feature: {% else %} {{ item.style.color }} {% endif %} + text: |- + {% if item.text %} + {% if attribute(tags, "piste:name") %} + {{ localizedTag(tags, 'piste:name') }} + {% elseif attribute(tags, "name") %} + {{ localizedTag(tags, 'name') }} + {% endif %} + {% endif %} + textRepeat: '1' + textOffset: -8 + lineCap: round + dashArray: |- + {% if restricted_access_value %}5,5{% endif %} style:casing: width: '{{item.style.casing.width}}' pane: casing - text: |- - {% if item.text %} - {% if attribute(tags, "piste:name") %} - {{ localizedTag(tags, 'piste:name') }} - {% elseif attribute(tags, "name") %} - {{ localizedTag(tags, 'name') }} - {% endif %} - {% endif %} - textRepeat: '1' - lineCap: round - dashArray: |- - {% if restricted_access_value %}5,5{% endif %} priority: |- {% if item is defined %} {{ item['priority'] }} @@ -213,12 +254,11 @@ feature: const: marker: style: - color: '#FFFFFF' - color_informal: '#BFBFBF' + color: '#B3D2FF' color_restricted: '#7F7F7F' portage=portage: symbol: line - priority: 2 + priority: 4 text: true style: width: 4 @@ -257,6 +297,7 @@ const: sign: priority: 3 shop=rental: + symbol: pointer sign: priority: 3 \ No newline at end of file