From 4245c16d41435791fdf37929c9e7a9b9bf122f27 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Thu, 27 Jul 2023 14:33:28 +0200 Subject: [PATCH 1/2] Change zoom values, add survey question --- assets/layers/questions/questions.json | 21 +++++++++++++++++++++ assets/layers/recycling/recycling.json | 7 ++++--- assets/themes/waste/waste.json | 4 ++-- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/assets/layers/questions/questions.json b/assets/layers/questions/questions.json index 58e8131c0..1f5672680 100644 --- a/assets/layers/questions/questions.json +++ b/assets/layers/questions/questions.json @@ -2150,6 +2150,27 @@ } } ] + }, + { + "id": "survey_date", + "question": { + "en": "When was this object last surveyed?" + }, + "freeform": { + "key": "survey:date", + "type": "date" + }, + "render": { + "en": "This object was last surveyed on {survey:date}" + }, + "mappings": [ + { + "if": "survey:date:={_now:date}", + "then": { + "en": "This object was last surveyed today" + } + } + ] } ] } \ No newline at end of file diff --git a/assets/layers/recycling/recycling.json b/assets/layers/recycling/recycling.json index 51fcececd..297f26d88 100644 --- a/assets/layers/recycling/recycling.json +++ b/assets/layers/recycling/recycling.json @@ -25,7 +25,7 @@ "calculatedTags": [ "_waste_amount=Object.values(Object.keys(feat.properties).filter((key) => key.startsWith('recycling:')).reduce((cur, key) => { return Object.assign(cur, { [key]: feat.properties[key] })}, {})).reduce((n, x) => n + (x == \"yes\"), 0);" ], - "minzoom": 11, + "minzoom": 10, "title": { "render": { "en": "Recycling facility", @@ -1262,7 +1262,8 @@ "ca": "Aquesta instal·lació de reciclatge la pot utilitzar {access}", "fr": "Ce point de recyclage peut être utilisé par {access}" } - } + }, + "survey_date" ], "filter": [ "open_now", @@ -1566,4 +1567,4 @@ "enableRelocation": true, "enableImproveAccuracy": true } -} +} \ No newline at end of file diff --git a/assets/themes/waste/waste.json b/assets/themes/waste/waste.json index ca29f00e9..90c992cf6 100644 --- a/assets/themes/waste/waste.json +++ b/assets/themes/waste/waste.json @@ -34,8 +34,8 @@ { "builtin": "waste_basket", "override": { - "minzoom": 18, - "minzoomVisible": 18 + "minzoom": 16, + "minzoomVisible": 16 } }, "recycling", From 840679961ffbb27c4748cc91366088e5414a5f41 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Thu, 27 Jul 2023 14:33:34 +0200 Subject: [PATCH 2/2] Allow adding crossing in kerbs and crossings theme --- .../kerbs_and_crossings.json | 37 ++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/assets/themes/kerbs_and_crossings/kerbs_and_crossings.json b/assets/themes/kerbs_and_crossings/kerbs_and_crossings.json index c44fa1d11..a42d540c0 100644 --- a/assets/themes/kerbs_and_crossings/kerbs_and_crossings.json +++ b/assets/themes/kerbs_and_crossings/kerbs_and_crossings.json @@ -28,10 +28,45 @@ "startLat": 53.23776, "startLon": 6.53812, "layers": [ + { + "builtin": "cycleways_and_roads", + "override": { + "title": null, + "forceLoad": true, + "minzoom": 18, + "passAllFeatures": true, + "shownByDefault": false + } + }, { "builtin": "crossings", "override": { - "=presets": [], + "=presets": [ + { + "title": { + "en": "a crossing", + "nl": "een oversteekplaats", + "de": "eine Kreuzung", + "fr": "une traversée", + "ca": "un pas de vianants", + "da": "en overgang", + "es": "un cruce" + }, + "tags": [ + "highway=crossing" + ], + "description": { + "en": "Crossing for pedestrians and/or cyclists", + "nl": "Oversteekplaats voor voetgangers en/of fietsers", + "de": "Kreuzung für Fußgänger und/oder Radfahrer", + "fr": "Traversée pour piétons et/ou cyclistes", + "da": "Overgang for fodgængere og/eller cyklister", + "es": "Cruce para peatones y/o ciclistas" + }, + "snapToLayer": "cycleways_and_roads", + "maxSnapDistance": 25 + } + ], "source": { "osmTags": "highway=crossing" }