From 91018e63eab018a85ab0641740b9bf28fc6f01f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Fri, 26 Jan 2018 18:58:19 +0100 Subject: [PATCH] Public: Map key, code improvements --- public.json | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/public.json b/public.json index b13b8ae21..851ba0cfb 100644 --- a/public.json +++ b/public.json @@ -36,15 +36,32 @@ ] }, "feature": { - "title": "{{ tags.name|default(tags.operator)|default(tagTrans('amenity', tags.amenity)) }}", - "description": "{{ tagTrans('amenity', tags.amenity) }}", + "pre": [ + "{% if tags.drinking_water %}", + "{% set value = 'drinking_water' %}", + "{% else %}", + "{% set value = tags.amenity %}", + "{% endif %}" + ], + "title": "{{ tags.name|default(tags.operator)|default(tagTrans('amenity', value)) }}", + "description": "{{ tagTrans('amenity', value) }}", "body": "{% if tags.operator %}{{ keyTrans('operator') }}: {{ tags.operator }}
{% endif %}", "markerSign": [ - "{% if const[tags.amenity] %}", - "{{ attribute(const, tags.amenity)|raw }}", + "{% if const[value] %}", + "{{ const[value]|raw }}", "{% endif %}" ] }, + "info": [ + "", + "{% for value, sign in const %}", + " ", + " ", + " ", + " ", + "{% endfor %}", + "
{{ markerCircle({})|raw }}
{{ sign|raw }}
{{ tagTrans('amenity', value) }}
" + ], "const": { "courthouse": "⚖", "clock": "",