From 74203ab2a49841deb47807600186f87c8e940a44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Mon, 17 Dec 2018 07:39:58 +0100 Subject: [PATCH] buildings-type: unfin --- buildings-type.json | 42 +++++++++++++++++++++++++----------------- buildings.json | 3 +++ 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/buildings-type.json b/buildings-type.json index 9c0fc45..95af524 100644 --- a/buildings-type.json +++ b/buildings-type.json @@ -1,8 +1,8 @@ { "type": "overpass", "name": { - "de": "Typ", - "en": "Type" + "de": "Gebäudearten", + "en": "Building types" }, "query": { "16": [ @@ -14,17 +14,20 @@ }, "feature": { "pre": [ - "{% if tags.building == 'yes' %}", - "{% set color = '#7f7f7f' %}", - "{% else %}", - "{% set color = '#7f0000' %}", + "{% set color = \"#7f7f7f\" %}", + "{% if tags.building in const %}", + "{% set color = const[tags.building] %}", "{% endif %}" ], "description": [ - "{{ tagTrans('building', tags.building) }}" + "{% if tags.building == 'yes' %}", + "{{ keyTrans('building') }}", + "{% else %}", + "{{ tagTrans('building', tags.building) }}", + "{% 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", @@ -38,23 +41,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
", @@ -64,27 +67,32 @@ "{{ 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
", "", "" - ] + ], + "const": { + "yes": "#7f7f7f", + "apartments": "#ff0000", + "place_of_worship": "#af29cc" + } } diff --git a/buildings.json b/buildings.json index cae67fd..ba4e1e0 100644 --- a/buildings.json +++ b/buildings.json @@ -7,6 +7,9 @@ "pt-br": "Edificações" }, "subCategories": [ + { + "id": "buildings-type" + }, { "id": "buildings-figure-ground" },