From 6053d2e119c7e7df847748d347c088d1fa6708e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= <skunk@xover.mud.at> Date: Fri, 27 Jul 2018 06:22:48 +0200 Subject: [PATCH] buildings-type: unfin --- buildings-type.json | 90 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 buildings-type.json diff --git a/buildings-type.json b/buildings-type.json new file mode 100644 index 0000000..9c0fc45 --- /dev/null +++ b/buildings-type.json @@ -0,0 +1,90 @@ +{ + "type": "overpass", + "name": { + "de": "Typ", + "en": "Type" + }, + "query": { + "16": [ + "(", + " way[building];", + " relation[building];", + ")" + ] + }, + "feature": { + "pre": [ + "{% if tags.building == 'yes' %}", + "{% set color = '#7f7f7f' %}", + "{% else %}", + "{% set color = '#7f0000' %}", + "{% endif %}" + ], + "description": [ + "{{ tagTrans('building', tags.building) }}" + ], + "markerSymbol": null, + "listMarkerSymbol": "{{ markerCircle({fillColor: color})|raw }}", + "priority": "{{ (approxHeight|default(0)) * -1 }}", + "style": { + "width": "1", + "color": "#000000", + "fillColor": "{{ color }}", + "fillOpacity": "1" + } + }, + "info": [ + "<div style='display: inline-block'>", + "{{ tagTrans('height') }}", + "<table>", + " <tr>", + " <td>{{ markerCircle({ 'fillColor': '#7f7f7f' })|raw }}</td>", + " <td colspan>{{ trans('unknown') }}</td>", + " </tr>", + "{% for i in range(0, 50, 10) %}", + " <tr>", + " <td>{{ markerCircle({ 'fillColor': colorInterpolate(['green', 'red'], i / 50) })|raw }}</td>", + " <td>{{ i }}m</td>", + " </tr>", + "{% endfor %}", + "{% for i in range(100, 250, 50) %}", + " <tr>", + " <td>{{ markerCircle({ 'fillColor': colorInterpolate(['red', 'yellow'], (i - 50) / 250) })|raw }}</td>", + " <td>{{ i }}m</td>", + " </tr>", + "{% endfor %}", + " <tr>", + " <td>{{ markerCircle({ 'fillColor': 'yellow' })|raw }}</td>", + " <td>≥300m</td>", + " </tr>", + "</table>", + "</div>", + "", + "<div style='display: inline-block'>", + "{{ tagTrans('building:levels') }}", + "<table>", + " <tr>", + " <td>{{ markerCircle({ 'fillColor': '#7f7f7f' })|raw }}</td>", + " <td colspan>{{ trans('unknown') }}</td>", + " </tr>", + "{% for i in range(0, 12, 3) %}", + " <tr>", + " <td>{{ markerCircle({ 'fillColor': colorInterpolate(['green', 'red'], (i * 3.5) / 50) })|raw }}</td>", + " <td>{{ i }}</td>", + " </tr>", + "{% endfor %}", + "{% for i in range(15, 84, 15) %}", + " <tr>", + " <td>{{ markerCircle({ 'fillColor': colorInterpolate(['red', 'yellow'], (i * 3.5 - 50) / 250) })|raw }}</td>", + " <td>{{ i }}</td>", + " </tr>", + "{% endfor %}", + " <tr>", + " <td>{{ markerCircle({ 'fillColor': 'yellow' })|raw }}</td>", + " <td>≥85</td>", + " </tr>", + "</table>", + "", + "</div>" + ] +}