From 37222bcbc3156e06624589b763b46fb13b6449d7 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Fri, 5 Nov 2021 21:17:20 +0100 Subject: [PATCH] Experiment with post partner --- assets/themes/postboxes/postboxes.json | 110 ++++++++++++++++++++++++- langs/themes/de.json | 8 ++ langs/themes/en.json | 44 ++++++++++ 3 files changed, 160 insertions(+), 2 deletions(-) diff --git a/assets/themes/postboxes/postboxes.json b/assets/themes/postboxes/postboxes.json index 086b5f42350..bf926c07aab 100644 --- a/assets/themes/postboxes/postboxes.json +++ b/assets/themes/postboxes/postboxes.json @@ -111,13 +111,44 @@ }, "minzoom": 12, "source": { - "osmTags": "amenity=post_office" + "osmTags": { + "or": [ + "amenity=post_office", + "post_office=post_partner" + ] + } }, "title": { "render": { "en": "Post Office", "de": "Poststelle" - } + }, + "mappings": [ + { + "if": { + "and": [ + "post_office=post_partner", + "name=" + ] + }, + "then": { + "en": "Post partner at a shop", + "de": "Postfiliale im Einzelhandel" + } + }, + { + "if": { + "and": [ + "post_office=post_partner", + "name~*" + ] + }, + "then": { + "en": "Post partner at {name}", + "de": "Postfiliale im {name}" + } + } + ] }, "description": { "en": "A layer showing post offices.", @@ -150,6 +181,81 @@ } ], "id": "OH" + }, + { + "id": "partner-brand", + "render": { + "en": "This location offers services for {post_office:brand}" + }, + "question": { + "en": "For which brand does this location offer services?" + }, + "condition": "post_office=post_partner", + "freeform": { + "key": "post_office:brand", + "type": "string" + }, + "multiAnswer": true, + "mappings": [ + { + "if": "post_office:brand=DHL", + "then": { + "en": "This location offers services for DHL" + }, + "hideInAnswer": "_country=de" + }, + { + "if": "post_office:brand=DPD", + "then": { + "en": "This location offers services for DPD" + } + }, + { + "if": "post_office:brand=GLS", + "then": { + "en": "This location offers services for GLS" + } + }, + { + "if": "post_office:brand=UPS", + "then": { + "en": "This location offers services for UPS" + } + }, + { + "if": "post_office:brand=DHL Paketshop", + "then": { + "en": "This location is a DHL Paketshop" + }, + "hideInAnswer": "_country!=de" + }, + { + "if": "post_office:brand=Hermes PaketShop", + "then": { + "en": "This location is a Hermes PaketShop" + }, + "hideInAnswer": "_country!=de" + }, + { + "if": "post_office:brand=PostNL", + "then": { + "en": "This location is a PostNL-point" + }, + "hideInAnswer": { + "and": [ + "_country!=nl", + "_country!=be" + ] + } + }, + { + "if": "post_office:brand=bpost", + "then": { + "en": "This location offers services for bpost" + }, + "hideInAnswer": "_country!=be" + } + ] } ], "presets": [ diff --git a/langs/themes/de.json b/langs/themes/de.json index 93b3b2ac129..b5fcf7742eb 100644 --- a/langs/themes/de.json +++ b/langs/themes/de.json @@ -1070,6 +1070,14 @@ } }, "title": { + "mappings": { + "0": { + "then": "Postfiliale im Einzelhandel" + }, + "1": { + "then": "Postfiliale im {name}" + } + }, "render": "Poststelle" } } diff --git a/langs/themes/en.json b/langs/themes/en.json index ff3351ae1f0..adc7c6dd176 100644 --- a/langs/themes/en.json +++ b/langs/themes/en.json @@ -1216,9 +1216,47 @@ }, "question": "What are the opening hours for this post office?", "render": "Opening Hours: {opening_hours_table()}" + }, + "partner-brand": { + "mappings": { + "0": { + "then": "This location offers services for DHL" + }, + "1": { + "then": "This location offers services for DPD" + }, + "2": { + "then": "This location offers services for GLS" + }, + "3": { + "then": "This location offers services for UPS" + }, + "4": { + "then": "This location is a DHL Paketshop" + }, + "5": { + "then": "This location is a Hermes PaketShop" + }, + "6": { + "then": "This location is a PostNL-point" + }, + "7": { + "then": "This location offers services for bpost" + } + }, + "question": "For which brand does this location offer services?", + "render": "This location offers services for {post_office:brand}" } }, "title": { + "mappings": { + "0": { + "then": "Post partner at a shop" + }, + "1": { + "then": "Post partner at {name}" + } + }, "render": "Post Office" } } @@ -1332,6 +1370,12 @@ "description": "Addresses", "name": "Known addresses in OSM", "tagRenderings": { + "address-sign-image": { + "render": "{image_carousel(image:address)}
{image_upload(image:address, Add image of the address)}" + }, + "fixme": { + "question": "What should be fixed here? Please explain" + }, "uk_addresses_explanation_osm": { "render": "This address is saved in OpenStreetMap" },