From 2feba1dba75c40b8e7f03a0dcd8439053131a7a9 Mon Sep 17 00:00:00 2001 From: Nathan Hartley Date: Tue, 28 Feb 2023 21:33:47 -0500 Subject: [PATCH] Matched format of detailsBody.html --- paddling_amenities.yaml | 64 +++++++++++++++++++----------- paddling_hazards.yaml | 86 +++++++++++++++++++++++++++++++++-------- 2 files changed, 110 insertions(+), 40 deletions(-) diff --git a/paddling_amenities.yaml b/paddling_amenities.yaml index fac9198..5581cc4 100644 --- a/paddling_amenities.yaml +++ b/paddling_amenities.yaml @@ -43,35 +43,53 @@ feature: {{ tagTrans(key, value) }} body: |- {% if constIndex in ['canoe=put_in', 'leisure=slipway','canoe=portage'] %} -
-
{{ keyTrans('Description') }}
-
{{ localizedTag(tags, 'description') }}
+
- {% endif %} + + {% endif %} + markerSign: '{{ item[''sign''] | raw }}' markerSymbol: | {% if item['sign'] %}{{ markerPointer({ fillColor: '#FFFFFF' }) }}{% endif %} diff --git a/paddling_hazards.yaml b/paddling_hazards.yaml index 48bb4df..5572f9e 100644 --- a/paddling_hazards.yaml +++ b/paddling_hazards.yaml @@ -3,12 +3,23 @@ query: '12': |- ( nwr[waterway~"^(dam|weir|waterfall|rapids|lock|lock_gate|sluice_gate)$"]; + nwr["seamark:restricted_area:restriction"~"no_entry|restricted_entry"]; + node["seamark:bridge:clearance_height"]; ) feature: pre: |- {% if tags.waterway %} {% set key = 'waterway' %} {% set value = tags.waterway %} + {% elseif attribute(tags, 'seamark:restricted_area:restriction') %} + {% set key = 'seamark:restricted_area:restriction' %} + {% set value = '' %} + {% elseif attribute(tags, 'seamark:bridge:clearance_height') %} + {% set key = 'seamark:bridge:clearance_height' %} + {% set value = attribute(tags, 'seamark:bridge:clearance_height') | round %} + {% if value > 4 %} + {% set value = 4 %} + {% endif %} {% endif %} {% set constIndex = (key ~ "=" ~ value) %} @@ -16,27 +27,51 @@ feature: title: | {{ item['sign'] | raw }} {{ localizedTag(tags, 'name') | default(localizedTag(tags, 'key')) | default(localizedTag(tags, 'ref')) }} description: | - {{ tagTrans(key, value) }} + {% if key == 'seamark:restricted_area:restriction' %} + {{ attribute(tags, 'seamark:restricted_area:restriction') }} + {% elseif key == 'seamark:bridge:clearance_height' %} + {{ attribute(tags, 'seamark:bridge:clearance_height') }} Meters + {% else %} + {{ tagTrans(key, value) }} + {% endif %} body: |- -
-
{{ keyTrans('Description') }}
-
{{ localizedTag(tags, 'description') }}
- +
+ markerSign: markerSymbol: | {{ markerPointer({ fillColor: '#ff6700' }) }} @@ -70,4 +105,21 @@ const: waterway=sluice_gate: sign: priority: 0 - + seamark:restricted_area:restriction=: + sign: + priority: 1 + seamark:bridge:clearance_height=0: + sign: + priority: 0 + seamark:bridge:clearance_height=1: + sign: + priority: 0 + seamark:bridge:clearance_height=2: + sign: + priority: 0 + seamark:bridge:clearance_height=3: + sign: + priority: 0 + seamark:bridge:clearance_height=4: + sign: + priority: 0