From 818671599d1afd6fbe50408070bf145c64eca239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Wed, 31 Jan 2018 21:24:34 +0100 Subject: [PATCH] Disposal: improve code, map key, add icons, add amenity=waste_basket --- waste.json | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 3 deletions(-) diff --git a/waste.json b/waste.json index adfb9e4a..2b946da9 100644 --- a/waste.json +++ b/waste.json @@ -37,6 +37,19 @@ "relation[man_made=wastewater_plant];", "relation[amenity=recycling];", ")" + ], + "18": [ + "(", + "node[landuse=landfill];", + "node[man_made=wastewater_plant];", + "node[amenity~\"^(recycling|waste_basket)$\"];", + "way[landuse=landfill];", + "way[man_made=wastewater_plant];", + "way[amenity=recycling];", + "relation[landuse=landfill];", + "relation[man_made=wastewater_plant];", + "relation[amenity=recycling];", + ")" ] }, "feature": { @@ -47,16 +60,50 @@ "{% elseif tags.man_made == 'wastewater_plant' %}", " {% set key = 'man_made' %}", " {% set value = tags.man_made %}", - "{% elseif tags.amenity == 'recycling' %}", + "{% elseif tags.amenity == 'recycling' or tags.amenity == 'waste_basket' %}", " {% set key = 'amenity' %}", " {% set value = tags.amenity %}", - "{% endif %}" + "{% endif %}", + "{% set kv = key ~ '=' ~ value %}" ], "description": "{{ tagTrans(key, value) }}", "body": [ "{% if tags.recycling_type %}", "{{ keyTrans('recycling_type') }}: {{ tagTrans('recycling_type', tags.recycling_type) }}", "{% endif %}" + ], + "markerSign": [ + "{% if const[kv] %}", + "{{ const[kv].sign|raw }}", + "{% endif %}" ] + }, + "info": [ + "", + "{% for kv, data in const %}", + " {% if map.zoom >= data.zoom %}", + " {% set key = kv|split('=')[0] %}", + " {% set value = kv|split('=')[1] %}", + " ", + " ", + " ", + " ", + " {% endif %}", + "{% endfor %}", + " ", + " ", + " ", + " ", + "
{{ markerCircle({})|raw }}
{{ data.sign|raw }}
{{ tagTrans('leisure', value) }}
{{ markerCircle({})|raw }}{{ trans('other') }}
" + ], + "const": { + "amenity=recycling": { + "minZoom": 13, + "sign": "" + }, + "amenity=waste_basket": { + "minZoom": 18, + "sign": "" + } } -} +} \ No newline at end of file