From 245e773638488945079f1f6581be441c0d418a81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Tue, 26 Dec 2023 08:30:04 +0100 Subject: [PATCH] buildings-height: show height as label --- buildings-height.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/buildings-height.yaml b/buildings-height.yaml index 69399a6..543b6a7 100644 --- a/buildings-height.yaml +++ b/buildings-height.yaml @@ -50,6 +50,22 @@ feature: markerSymbol: null listMarkerSymbol: |- {{ markerPolygon({"fillColor": color, "fillOpacity": 0.8, "width": 1, "color": "#000000" })|raw }} + markerSign: |- + {% if map.zoom >= 18 %} + + {%- if attribute(tags, 'building:levels') is defined -%} + {{ attribute(tags, 'building:levels') }} +
+ {% endif %} + + {% if tags.height is defined %} + {% if tags.height|matches('(m|ft)$') %}({{ tags.height -}}) + {% else %}({{ tags.height }}m) + {%- endif -%} + {% endif -%} +
+ {% else %} {% endif %} + listMarkerSign: ' ' priority: |- {{ (approxHeight|default(0)) * -1 }} style: