From a57dbe09d60734785420c4502699fcb6d89c6033 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Sat, 8 Jul 2023 02:55:45 +0200 Subject: [PATCH] Themes: add memorial layer, use 'subject' instead of 'name' for ghost bikes --- assets/layers/ghost_bike/ghost_bike.json | 40 ++++++++++++++++++----- assets/layers/memorial/license_info.json | 12 +++++++ assets/layers/memorial/memorial.json | 41 ++++++++++++++++++++++++ assets/layers/memorial/plaque.svg | 38 ++++++++++++++++++++++ 4 files changed, 123 insertions(+), 8 deletions(-) create mode 100644 assets/layers/memorial/license_info.json create mode 100644 assets/layers/memorial/memorial.json create mode 100644 assets/layers/memorial/plaque.svg diff --git a/assets/layers/ghost_bike/ghost_bike.json b/assets/layers/ghost_bike/ghost_bike.json index f50dabfc3f..8f50e2a74a 100644 --- a/assets/layers/ghost_bike/ghost_bike.json +++ b/assets/layers/ghost_bike/ghost_bike.json @@ -48,6 +48,16 @@ "ca": "Bicicleta blanca" }, "mappings": [ + { + "if": "subject~*", + "then": { + "en": "Ghost bike in the remembrance of {subject}", + "nl": "Witte fiets ter nagedachtenis van {subject}", + "de": "Geisterrad im Gedenken an {subject}", + "it": "Bici fantasma in ricordo di {subject}", + "fr": "Vélo fantôme en souvenir de {subject}" + } + }, { "if": "name~*", "then": { @@ -111,17 +121,30 @@ "fr": "À qui est dédié ce vélo fantôme ?" }, "render": { - "en": "In remembrance of {name}", - "nl": "Ter nagedachtenis van {name}", - "de": "Im Gedenken an {name}", - "it": "In ricordo di {name}", - "fr": "En souvenir de {name}", - "ru": "В знак памяти о {name}" + "en": "In remembrance of {subject}", + "nl": "Ter nagedachtenis van {subject}", + "de": "Im Gedenken an {subject}", + "it": "In ricordo di {subject}", + "fr": "En souvenir de {subject}", + "ru": "В знак памяти о {subject}" }, "freeform": { - "key": "name" + "key": "subject", + "addExtraTags": ["noname=","name="] }, "mappings": [ + { + "if": "name~*", + "then": { + "en": "In remembrance of {name}", + "nl": "Ter nagedachtenis van {name}", + "de": "Im Gedenken an {name}", + "it": "In ricordo di {name}", + "fr": "En souvenir de {name}", + "ru": "В знак памяти о {name}" + }, + "hideInAnswer": true + }, { "if": "noname=yes", "then": { @@ -131,7 +154,8 @@ "it": "Nessun nome scritto sulla bici", "fr": "Aucun nom n'est marqué sur le vélo", "ca": "No hi ha cap nom marcat a la bicicleta" - } + }, + "addExtraTags": ["name=","subject="] } ], "id": "ghost_bike-name", diff --git a/assets/layers/memorial/license_info.json b/assets/layers/memorial/license_info.json new file mode 100644 index 0000000000..3d4379d1cd --- /dev/null +++ b/assets/layers/memorial/license_info.json @@ -0,0 +1,12 @@ +[ + { + "path": "plaque.svg", + "license": "CC-0", + "authors": [ + "OSM Carto" + ], + "sources": [ + "https://wiki.openstreetmap.org/wiki/File:Plaque.svg" + ] + } +] \ No newline at end of file diff --git a/assets/layers/memorial/memorial.json b/assets/layers/memorial/memorial.json new file mode 100644 index 0000000000..9515842e99 --- /dev/null +++ b/assets/layers/memorial/memorial.json @@ -0,0 +1,41 @@ +{ + "id": "memorial", + "description": "Layer showing memorial plaques, based upon a unofficial theme. Can be expanded to have multiple types of memorials later on", + "source": { + "osmTags": "memorial=plaque" + }, + "title": { + "render": { + "en": "Memorial plaque" + } + }, + "tagRenderings": [ + { + "id": "inscription", + "question": { + "en": "What is the inscription of this plaque?" + }, + "render": { + "en": "The inscription on this plaque reads:

{inscription}

" + }, + "freeform": { + "key": "inscription", + "type": "text" + } + } + ], + "mapRendering": [ + { + "location": [ + "centroid", + "point" + ], + "icon": "circle:white;./assets/layers/memorial/plaque.svg" + } + ], + "deletion": true, + "allowMove": { + "enableImproveAccuracy": true, + "enableRelocation": false + } +} diff --git a/assets/layers/memorial/plaque.svg b/assets/layers/memorial/plaque.svg new file mode 100644 index 0000000000..e91e9efe42 --- /dev/null +++ b/assets/layers/memorial/plaque.svg @@ -0,0 +1,38 @@ + + + + + + image/svg+xml + + + + + + + + +