From a66c807f628ba607f42975d7a2d7082163c3ee62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Sun, 16 Dec 2018 22:17:44 +0100 Subject: [PATCH] buildings-height: similar markers as in building age --- buildings-height.json | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/buildings-height.json b/buildings-height.json index 84c21afc..28c2e149 100644 --- a/buildings-height.json +++ b/buildings-height.json @@ -14,9 +14,9 @@ }, "feature": { "pre": [ - "{% if tags.height %}", + "{% if tags.height is defined %}", "{% set approxHeight = tags.height %}", - "{% elseif attribute(tags, 'building:levels') %}", + "{% elseif attribute(tags, 'building:levels') is defined %}", "{% set approxHeight = attribute(tags, 'building:levels') * 3.5 %}", "{% endif %}", "", @@ -29,16 +29,16 @@ "{% endif %}" ], "description": [ - "{% if tags.height %}", + "{% if tags.height is defined %}", "{{ tags.height }}m", "{% endif %}", "", - "{% if attribute(tags, 'building:levels') %}", + "{% if attribute(tags, 'building:levels') is defined %}", "{{ attribute(tags, 'building:levels') }} {{ keyTrans('building:levels') }}", "{% endif %}" ], "markerSymbol": null, - "listMarkerSymbol": "{{ markerCircle({fillColor: color})|raw }}", + "listMarkerSymbol": "{{ markerPolygon({\"fillColor\": color, \"fillOpacity\": 0.8, \"width\": 1, \"color\": \"#000000\" })|raw }}", "priority": "{{ (approxHeight|default(0)) * -1 }}", "style": { "width": "1", @@ -52,23 +52,23 @@ "{{ tagTrans('height') }}", "", " ", - " ", + " ", " ", " ", "{% for i in range(0, 50, 10) %}", " ", - " ", + " ", " ", " ", "{% endfor %}", "{% for i in range(100, 250, 50) %}", " ", - " ", + " ", " ", " ", "{% endfor %}", " ", - " ", + " ", " ", " ", "
{{ markerCircle({ 'fillColor': '#7f7f7f' })|raw }}{{ markerPolygon(evaluate({ \"building\": \"yes\" }))|raw }}{{ trans('unknown') }}
{{ markerCircle({ 'fillColor': colorInterpolate(['green', 'red'], i / 50) })|raw }}{{ markerPolygon(evaluate({ \"building\": \"yes\", \"height\": i }))|raw }}{{ i }}m
{{ markerCircle({ 'fillColor': colorInterpolate(['red', 'yellow'], (i - 50) / 250) })|raw }}{{ markerPolygon(evaluate({ \"building\": \"yes\", \"height\": i }))|raw }}{{ i }}m
{{ markerCircle({ 'fillColor': 'yellow' })|raw }}{{ markerPolygon(evaluate({ \"building\": \"yes\", \"height\": \"300\" }))|raw }}≥300m
", @@ -78,23 +78,23 @@ "{{ tagTrans('building:levels') }}", "", " ", - " ", + " ", " ", " ", "{% for i in range(0, 12, 3) %}", " ", - " ", + " ", " ", " ", "{% endfor %}", "{% for i in range(15, 84, 15) %}", " ", - " ", + " ", " ", " ", "{% endfor %}", " ", - " ", + " ", " ", " ", "
{{ markerCircle({ 'fillColor': '#7f7f7f' })|raw }}{{ markerPolygon(evaluate({ \"building\": \"yes\" }))|raw }}{{ trans('unknown') }}
{{ markerCircle({ 'fillColor': colorInterpolate(['green', 'red'], (i * 3.5) / 50) })|raw }}{{ markerPolygon(evaluate({ \"building\": \"yes\", \"building:levels\": i }))|raw }}{{ i }}
{{ markerCircle({ 'fillColor': colorInterpolate(['red', 'yellow'], (i * 3.5 - 50) / 250) })|raw }}{{ markerPolygon(evaluate({ \"building\": \"yes\", \"building:levels\": i }))|raw }}{{ i }}
{{ markerCircle({ 'fillColor': 'yellow' })|raw }}{{ markerPolygon(evaluate({ \"building\": \"yes\", \"building:levels\": \"85\" }))|raw }}≥85
",