From ece39191ea510fdcfd7768459258e12afc40a41f Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Sun, 7 Nov 2021 14:38:33 +0100 Subject: [PATCH] Added shop layer to add new post partners --- assets/themes/postboxes/postboxes.json | 98 ++++++++++++++++++++++++++ langs/themes/en.json | 36 ++++++++++ 2 files changed, 134 insertions(+) diff --git a/assets/themes/postboxes/postboxes.json b/assets/themes/postboxes/postboxes.json index f32cbdfd0..e64c25438 100644 --- a/assets/themes/postboxes/postboxes.json +++ b/assets/themes/postboxes/postboxes.json @@ -182,6 +182,30 @@ ], "id": "OH" }, + { + "id": "post_partner", + "question": { + "en": "Is this a post partner?" + }, + "condition": "post_office=post_partner", + "mappings": [ + { + "if": "post_office=post_partner", + "then": { + "en": "This shop is a post partner" + } + }, + { + "if": "post_office=", + "then": { + "en": "This shop is not a post partner" + }, + "addExtraTags": [ + "was:post_office=post_partner" + ] + } + ] + }, { "id": "partner-brand", "render": { @@ -446,6 +470,80 @@ } } ] + }, + { + "id": "addLayer", + "name": { + "en": "Add new post partner" + }, + "description": { + "en": "Add a new post partner to the map" + }, + "source": { + "osmTags": "shop~*" + }, + "minzoom": 20, + "minzoomVisible": 20, + "title": { + "render": { + "en": "Shop" + }, + "mappings": [ + { + "if": "name~*", + "then": { + "en": "{name}" + } + } + ] + }, + "mapRendering": [ + { + "icon": { + "render": "./assets/themes/shops/shop.svg" + }, + "iconSize": { + "render": "40,40,center" + }, + "location": [ + "point", + "centroid" + ] + }, + { + "color": { + "render": "#DADADA" + }, + "width": { + "render": "1" + } + } + ], + "tagRenderings": [ + { + "id": "post_partner", + "question": { + "en": "Is this shop a post partner?" + }, + "mappings": [ + { + "if": "post_office=post_partner", + "then": { + "en": "This shop is a post partner" + } + }, + { + "if": "post_office=", + "then": { + "en": "This shop is not a post partner" + }, + "addExtraTags": [ + "was:post_office=post_partner" + ] + } + ] + } + ] } ] } \ No newline at end of file diff --git a/langs/themes/en.json b/langs/themes/en.json index d4bd6eedd..c2d1f0bff 100644 --- a/langs/themes/en.json +++ b/langs/themes/en.json @@ -1295,6 +1295,17 @@ "question": "For which brand does this location offer services?", "render": "This location offers services for {post_office:brand}" }, + "post_partner": { + "mappings": { + "0": { + "then": "This shop is a post partner" + }, + "1": { + "then": "This shop is not a post partner" + } + }, + "question": "Is this a post partner?" + }, "stamps": { "mappings": { "0": { @@ -1319,6 +1330,31 @@ }, "render": "Post Office" } + }, + "2": { + "description": "Add a new post partner to the map", + "name": "Add new post partner", + "tagRenderings": { + "post_partner": { + "mappings": { + "0": { + "then": "This shop is a post partner" + }, + "1": { + "then": "This shop is not a post partner" + } + }, + "question": "Is this a post partner?" + } + }, + "title": { + "mappings": { + "0": { + "then": "{name}" + } + }, + "render": "Shop" + } } }, "shortDescription": "A map showing postboxes and post offices",