From b4d0a3517a350b14f98fe751211cde64682d87c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Sun, 25 Nov 2018 08:13:44 +0100 Subject: [PATCH] swimming_bathing: icons, map key --- swimming_bathing.json | 87 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 78 insertions(+), 9 deletions(-) diff --git a/swimming_bathing.json b/swimming_bathing.json index 0e090d381..5ae2e1365 100644 --- a/swimming_bathing.json +++ b/swimming_bathing.json @@ -30,22 +30,91 @@ ] }, "feature": { - "pre": "", - "description": [ + "pre": [ + "{% set k = null %}{% set v = null %}{% set append = null %}", "{% if tags.amenity == 'public_bath' %}", - "{{ tagTrans('amenity', 'public_bath' ) }}", - "{% if attribute(tags, 'bath:type') %}({{ tagTrans('bath:type', attribute(tags, 'bath:type')) }}){% endif %}", + " {% set k = 'amenity' %}", + " {% set v = 'public_bath' %}", + " {% if attribute(tags, 'bath:type') %}{% set append = tagTrans('bath:type', attribute(tags, 'bath:type')) %}{% endif %}", "{% elseif tags.tourism == 'spa_resort' %}", - "{{ tagTrans('tourism', tags.tourism ) }}", + " {% set k = 'tourism' %}", + " {% set v = tags.tourism %}", "{% elseif tags.leisure == 'sauna' %}", - " {{ tagTrans('leisure', 'sauna') }}", - " {% if tags.sauna and tags.sauna != 'yes' %}({{ tagTransList('sauna', tags.sauna) }}){% endif %}", + " {% set k = 'leisure' %}", + " {% set v = tags.leisure %}", + " {% if tags.sauna and tags.sauna != 'yes' %}{% set append = tagTransList('sauna', tags.sauna) %}{% endif %}", + "{% elseif tags.leisure == 'sports_centre' %}", + " {% set k = 'leisure' %}", + " {% set v = tags.leisure %}", + " {% set append = tagTrans('sport', 'swimming') %}", "{% elseif tags.leisure %}", - "{{ tagTrans('leisure', tags.leisure) }}", + " {% set k = 'leisure' %}", + " {% set v = tags.leisure %}", "{% elseif tags.natural %}", - "{{ tagTrans('natural', tags.natural) }}", + " {% set k = 'natural' %}", + " {% set v = tags.natural %}", + " {% if tags.sport %}{% set append = tagTrans('sport', 'swimming') %}{% endif %}", "{% endif %}" ], + "description": [ + "{{ tagTrans(k, v) }}", + "{% if append %}({{ append }}){% endif %}" + ], + "markerSign": "{{ const[k ~ '=' ~ v].sign|raw }}", "priority": "{% if tags.name %}0{% else %}1{% endif %}" + }, + "info": [ + "", + "{% for value, data in const %}", + "{% if data.zoom <= map.zoom %}", + " ", + " ", + " ", + " ", + "{% endif %}", + "{% endfor %}", + "
{{ markerCircle({})|raw }}
{{ data.sign|raw }}
{{ keyTrans(value) }}
" + ], + "const": { + "leisure=swimming_area": { + "zoom": 13, + "sign": "" + }, + "leisure=water_park": { + "zoom": 13, + "sign": "" + }, + "leisure=beach_resort": { + "zoom": 13, + "sign": "" + }, + "leisure=sports_centre": { + "zoom": 13, + "sign": "" + }, + "natural=water": { + "zoom": 13, + "sign": "" + }, + "natural=beach": { + "zoom": 13, + "sign": "" + }, + "amenity=public_bath": { + "zoom": 13, + "sign": "" + }, + "tourism=spa_resort": { + "zoom": 13, + "sign": "" + }, + "leisure=swimming_pool": { + "zoom": 16, + "sign": "" + }, + "leisure=sauna": { + "zoom": 16, + "sign": "" + } } }