Browse Source

memorial: more types, add alias, different translation

pedestrian
parent
commit
0ee1389def
  1. 94
      memorial.json

94
memorial.json

@ -26,27 +26,32 @@
"feature": { "feature": {
"pre": [ "pre": [
"{% set memtype = 'yes' %}", "{% set memtype = 'yes' %}",
"{% if tags.historic == 'monument' and tags.monument == 'war_monument' %}",
" {% set memtype = 'war_memorial' %}",
"{% elseif tags.memorial %}",
"{% if tags.memorial %}",
" {% set memtype = tags.memorial %}", " {% set memtype = tags.memorial %}",
"{% elseif attribute(tags, 'memorial:type') %}", "{% elseif attribute(tags, 'memorial:type') %}",
" {% set memtype = attribute(tags, 'memorial:type') %}", " {% set memtype = attribute(tags, 'memorial:type') %}",
"{% elseif attribute(tags, 'monument') %}", "{% elseif attribute(tags, 'monument') %}",
" {% set memtype = attribute(tags, 'monument') %}", " {% set memtype = attribute(tags, 'monument') %}",
"{% endif %}"
"{% elseif attribute(tags, 'memorial_type') %}",
" {% set memtype = attribute(tags, 'memorial_type') %}",
"{% endif %}",
"",
"{% set memgroup = memtype %}",
"{% for value, data in const %}",
"{% if memtype in data.alias %}",
"{% set memgroup = value %}",
"{% endif %}",
"{% endfor %}"
], ],
"description": [ "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) }}",
"{% if memtype != 'yes' and tags.historic == 'monument' %}",
" {{ tagTrans('historic', 'monument') }}",
"{% endif %}", "{% endif %}",
"", "",
"{% if tags.historic == 'monument' %}",
" ({{ tagTrans('historic', 'monument') }})",
"{% if memtype == 'yes' %}",
" {{ tagTrans('historic', tags.historic) }}",
"{% else %}",
" {{ tagTrans('memorial', memtype) }}",
"{% endif %}" "{% endif %}"
], ],
"priority": [ "priority": [
@ -92,7 +97,7 @@
"{% endif %}", "{% endif %}",
"</ul>" "</ul>"
], ],
"markerSign": "{% if memtype == 'yes' %}<img data-src=\"maki:monument\">{% else %}{{ const[memtype].sign|raw }}{% endif %}"
"markerSign": "{{ const[memgroup].sign|raw }}"
}, },
"info": [ "info": [
"<table>", "<table>",
@ -100,7 +105,7 @@
"{% if data.zoom <= map.zoom %}", "{% if data.zoom <= map.zoom %}",
" <tr>", " <tr>",
" <td>{{ markerCircle({})|raw }}<div class='sign'>{{ data.sign|raw }}</div></td>", " <td>{{ markerCircle({})|raw }}<div class='sign'>{{ data.sign|raw }}</div></td>",
" <td>{{ tagTrans('historic', value) }}</td>",
" <td>{{ tagTrans('memorial', value) }}{% for alias in data.alias %}, {{ tagTrans('memorial', alias) }}{% endfor %}</td>",
" </tr>", " </tr>",
"{% endif %}", "{% endif %}",
"{% endfor %}", "{% endfor %}",
@ -112,18 +117,9 @@
"{% endif %}", "{% endif %}",
"</table>" "</table>"
], ],
"const1": {
"yes": {
"sign": "<img data-src='maki:monument?size=15'>",
"zoom": 11
},
"memorial": {
"sign": "<span style='position: relative; top: -2px;'><img src='maki:monument?size=11'></span>",
"zoom": 14
}
},
"const": { "const": {
"plaque": { "plaque": {
"alias": [ "plate" ],
"sign": "<img data-src='img/plaque.svg'>", "sign": "<img data-src='img/plaque.svg'>",
"zoom": 14 "zoom": 14
}, },
@ -132,12 +128,58 @@
"zoom": 14 "zoom": 14
}, },
"statue": { "statue": {
"sign": "",
"sign": "<i class=\"fas fa-female\"></i>",
"zoom": 14 "zoom": 14
}, },
"war_memorial": { "war_memorial": {
"alias": [ "war_monument" ],
"sign": "<img data-src='maki:horse-riding'>", "sign": "<img data-src='maki:horse-riding'>",
"zoom": 14 "zoom": 14
},
"stolperstein": {
"sign": "",
"zoom": 14
},
"stone": {
"sign": "",
"zoom": 14
},
"bust": {
"alias": [ "person" ],
"sign": "<i class=\"fas fa-user-alt\"></i>",
"zoom": 14
},
"stele": {
"alias": [ "obelisk" ],
"sign": "",
"zoom": 14
},
"sculpture": {
"sign": "",
"zoom": 14
},
"ghost_bike": {
"sign": "<i style=\"color: white;\" class=\"fas fa-bicycle\"></i>",
"zoom": 14
},
"vehicle": {
"alias": [ "tank" ],
"sign": "<i class=\"fas fa-car\"></i>",
"zoom": 14
},
"cross": {
"sign": "<i class=\"fas fa-cross\"></i>",
"zoom": 14
},
"flood_mark": {
"alias": [ "high_water_mark" ],
"sign": "<i class=\"fas fa-water\"></i>",
"zoom": 14
},
"grave": {
"alias": [ "graveyard" ],
"sign": "",
"zoom": 14
} }
}, },
"filter": { "filter": {
@ -145,7 +187,7 @@
"name": "{{ trans('filter:type') }}", "name": "{{ trans('filter:type') }}",
"show_default": "true", "show_default": "true",
"type": "select", "type": "select",
"values": "{% for k, v in const %}<option value='{{ k }}' query='(nwr[memorial=\"{{ k }}\"];nwr[\"memorial:type\"=\"{{ k }}\"];nwr[\"monument\"=\"{{ k }}\"];{% if k == 'war_memorial' %}nwr[\"monument\"=\"war_monument\"];{% endif %})'>{{ tagTrans('historic', 'memorial memorial=' ~ k) }}</option>{% endfor %}"
"values": "{% for k, v in const %}<option value='{{ k }}' query='nwr[~\"^(memorial|memorial:type|memorial_type|monument)$\"~\"^({{ k }}{% for alias in v.alias %}|{{ alias }}{% endfor %})$\"]'>{{ tagTrans('memorial', k) }}{% for alias in v.alias %}, {{ tagTrans('memorial', alias) }}{% endfor %}</option>{% endfor %}"
}, },
"conflict": { "conflict": {
"key": "memorial:conflict", "key": "memorial:conflict",

Loading…
Cancel
Save