From 6504006fc899b5b130e225279d74bc627dd442a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Mon, 25 Feb 2019 22:14:59 +0100 Subject: [PATCH] memorial: rewrite (unfin) --- img/blue_plaque.svg | 104 ++++++++++++++++++++++++++++++++++++++++++++ img/plaque.svg | 104 ++++++++++++++++++++++++++++++++++++++++++++ memorial.json | 77 ++++++++++++++++++++------------ 3 files changed, 257 insertions(+), 28 deletions(-) create mode 100644 img/blue_plaque.svg create mode 100644 img/plaque.svg diff --git a/img/blue_plaque.svg b/img/blue_plaque.svg new file mode 100644 index 0000000..ffc85b7 --- /dev/null +++ b/img/blue_plaque.svg @@ -0,0 +1,104 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + Ab Cde + Lorem ipsum + + diff --git a/img/plaque.svg b/img/plaque.svg new file mode 100644 index 0000000..5aa441c --- /dev/null +++ b/img/plaque.svg @@ -0,0 +1,104 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + Ab Cde + Lorem ipsum + + diff --git a/memorial.json b/memorial.json index bd5b942..5197f05 100644 --- a/memorial.json +++ b/memorial.json @@ -25,14 +25,33 @@ }, "feature": { "pre": [ - "{% set value = tags.historic %}", - "{% if tags.historic == 'memorial' and tags.memorial %}", - " {% set value = tags.historic ~ ' memorial=' ~ tags.memorial %}", - "{% elseif tags.historic == 'memorial' and attribute(tags, 'memorial:type') %}", - " {% set value = tags.historic ~ ' memorial=' ~ attribute(tags, 'memorial:type') %}", + "{% set memtype = 'yes' %}", + "{% if tags.historic == 'monument' and tags.monument == 'war_monument' %}", + " {% set memtype = 'war_memorial' %}", + "{% elseif tags.memorial %}", + " {% set memtype = tags.memorial %}", + "{% elseif attribute(tags, 'memorial:type') %}", + " {% set memtype = attribute(tags, 'memorial:type') %}", + "{% elseif attribute(tags, 'monument') %}", + " {% set memtype = attribute(tags, 'monument') %}", "{% endif %}" ], - "description": "{{ tagTransList('historic', value) }}", + "description": [ + "{% if tags.historic == 'monument' and tags.monument == 'war_monument' %}", + " {{ tagTrans('historic', 'monument monument=war_monument') }}", + "{% elseif memtype == 'yes' %}", + " {{ tagTrans('historic', tags.historic) }}", + "{% else %}", + " {{ tagTrans('historic', 'memorial memorial=' ~ memtype) }}", + "{% endif %}", + "", + "{% if tags.historic == 'monument' %}", + " ({{ tagTrans('historic', 'monument') }})", + "{% endif %}" + ], + "priority": [ + "{% if tags.historic == 'monument' %}0[% else %}1{% endif %}" + ], "body": [ "" ], - "markerSign": "{{ const[value].sign|raw }}" + "markerSign": "{% if memtype == 'yes' %}{% else %}{{ const[memtype].sign|raw }}{% endif %}" }, "info": [ "", @@ -87,44 +106,46 @@ "{% endfor %}", "{% if 14 <= map.zoom %}", " ", - " ", + " ", " ", " ", "{% endif %}", "
{{ markerCircle({})|raw }}
{{ markerCircle({})|raw }}
{{ trans('other') }}
" ], - "const": { + "const1": { + "yes": { + "sign": "", + "zoom": 11 + }, "memorial": { - "sign": "", + "sign": "", + "zoom": 14 + } + }, + "const": { + "plaque": { + "sign": "", "zoom": 14 }, - "memorial memorial=plaque": { + "blue_plaque": { + "sign": "", + "zoom": 14 + }, + "statue": { "sign": "", "zoom": 14 }, - "monument": { - "sign": "", - "zoom": 11 + "war_memorial": { + "sign": "", + "zoom": 14 } }, "filter": { "type": { "name": "{{ trans('filter:type') }}", + "show_default": "true", "type": "select", - "values": { - "monument": { - "name": "{{ tagTrans('historic', 'monument') }}", - "query": "nwr[historic=monument]" - }, - "memorial": { - "name": "{{ tagTrans('historic', 'memorial') }}", - "query": "nwr[historic=memorial]" - }, - "stolperstein": { - "name": "{{ tagTrans('historic', 'memorial memorial=stolperstein') }}", - "query": "(nwr[memorial=stolperstein];nwr[\"memorial:type\"=stolperstein];)" - } - } + "values": "{% for k, v in const %}{% endfor %}" }, "conflict": { "key": "memorial:conflict",