From b99efa4b356922e8fd58e65f327f057e06026ba0 Mon Sep 17 00:00:00 2001 From: Osmwithspace <> Date: Wed, 19 Feb 2025 11:34:25 +0100 Subject: [PATCH 1/3] add group_hostel based on tourism_accomodation --- assets/themes/scouting/scouting.json | 133 +++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) diff --git a/assets/themes/scouting/scouting.json b/assets/themes/scouting/scouting.json index def4fbe18..a656ec645 100644 --- a/assets/themes/scouting/scouting.json +++ b/assets/themes/scouting/scouting.json @@ -47,6 +47,139 @@ "name": null, "isCounted": false } + }, + { + "builtin": "tourism_accomodation", + "override": { + "id": "group_hostel", + "minzoom": 7, + "=filter": null, + "name": { + "en": "Hostels for groups and scouts", + "de": "Gruppenunterkünfte für Gruppen/Pfadfinder:innen" + }, + "source": { + "=osmTags": { + "and": [ + "tourism=hostel", + { + "or": [ + "scout=yes", + "group_only=yes" + ] + } + ] + } + }, + "=presets": [ + { + "title": { + "en": "Hostel exclusively for groups", + "de": "Unterkunft ausschließlich für Gruppen/Pfadfinder:innen" + }, + "tags": [ + "tourism=hostel", + "group_only=yes" + ] + } + ], + "+tagRenderings": [ + { + "question": { + "de": "Ist diese Unterkunft ausschließlich für Gruppen?", + "en": "Is this hostel exclusively for groups?" + }, + "mappings": [ + { + "if": { + "and": [ + "group_only=yes" + ] + }, + "then": { + "en": "This hostel is exclusively for groups", + "de": "Diese Unterkunft ist ausschließlich für Gruppen" + } + }, + { + "if": { + "and": [ + "group_only=no" + ] + }, + "then": { + "en": "This hostel is not exclusively for groups", + "de": "Diese Unterkunft ist nicht ausschließlich für Gruppen" + } + } + ], + "id": "group_only" + } + ] + } + }, + { + "builtin": "tourism_accomodation", + "override": { + "id": "hostel", + "minzoom": 16, + "filter": { + "sameAs": "group_hostel" + }, + "name": null, + "isCounted": false, + "source": { + "=osmTags": { + "and": [ + "tourism=hostel" + ] + } + }, + "=presets": [ + { + "title": { + "en": "Hostel", + "de": "Gruppenunterkunft" + }, + "tags": [ + "tourism=hostel" + ] + } + ], + "+tagRenderings": [ + { + "question": { + "de": "Ist diese Unterkunft ausschließlich für Gruppen?", + "en": "Is this hostel exclusively for groups?" + }, + "mappings": [ + { + "if": { + "and": [ + "group_only=yes" + ] + }, + "then": { + "en": "This hostel is exclusively for groups", + "de": "Diese Unterkunft ist ausschließlich für Gruppen" + } + }, + { + "if": { + "and": [ + "group_only=no" + ] + }, + "then": { + "en": "This hostel is not exclusively for groups", + "de": "Diese Unterkunft ist nicht ausschließlich für Gruppen" + } + } + ], + "id": "group_only" + } + ] + } } ] } From 0822ce6208a1329c77ee02aa11d13cf4d598ac74 Mon Sep 17 00:00:00 2001 From: Osmwithspace <> Date: Wed, 19 Feb 2025 20:30:28 +0100 Subject: [PATCH 2/3] add group_only tagRendering in tourism_accomodation --- .../tourism_accomodation.json | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/assets/layers/tourism_accomodation/tourism_accomodation.json b/assets/layers/tourism_accomodation/tourism_accomodation.json index 11171f23d..81524d9fd 100644 --- a/assets/layers/tourism_accomodation/tourism_accomodation.json +++ b/assets/layers/tourism_accomodation/tourism_accomodation.json @@ -308,6 +308,42 @@ } }, "{preset_type_select()}", + { + "condition": { + "and": [ + "tourism=hostel" + ] + }, + "question": { + "de": "Ist diese Unterkunft ausschließlich für Gruppen?", + "en": "Is this hostel exclusively for groups?" + }, + "mappings": [ + { + "if": { + "and": [ + "group_only=yes" + ] + }, + "then": { + "en": "This hostel is exclusively for groups", + "de": "Diese Unterkunft ist ausschließlich für Gruppen" + } + }, + { + "if": { + "and": [ + "group_only=no" + ] + }, + "then": { + "en": "This hostel is not exclusively for groups", + "de": "Diese Unterkunft ist nicht ausschließlich für Gruppen" + } + } + ], + "id": "group_only" + }, "brand", "contact", "wheelchair-access", From 980ec75ca5a04e4544eefbec129ece6787fb2292 Mon Sep 17 00:00:00 2001 From: Osmwithspace <> Date: Wed, 19 Feb 2025 20:32:45 +0100 Subject: [PATCH 3/3] reome group_only tagRenderings from scouting theme --- assets/themes/scouting/scouting.json | 66 ---------------------------- 1 file changed, 66 deletions(-) diff --git a/assets/themes/scouting/scouting.json b/assets/themes/scouting/scouting.json index a656ec645..7323ac68e 100644 --- a/assets/themes/scouting/scouting.json +++ b/assets/themes/scouting/scouting.json @@ -82,39 +82,6 @@ "group_only=yes" ] } - ], - "+tagRenderings": [ - { - "question": { - "de": "Ist diese Unterkunft ausschließlich für Gruppen?", - "en": "Is this hostel exclusively for groups?" - }, - "mappings": [ - { - "if": { - "and": [ - "group_only=yes" - ] - }, - "then": { - "en": "This hostel is exclusively for groups", - "de": "Diese Unterkunft ist ausschließlich für Gruppen" - } - }, - { - "if": { - "and": [ - "group_only=no" - ] - }, - "then": { - "en": "This hostel is not exclusively for groups", - "de": "Diese Unterkunft ist nicht ausschließlich für Gruppen" - } - } - ], - "id": "group_only" - } ] } }, @@ -145,39 +112,6 @@ "tourism=hostel" ] } - ], - "+tagRenderings": [ - { - "question": { - "de": "Ist diese Unterkunft ausschließlich für Gruppen?", - "en": "Is this hostel exclusively for groups?" - }, - "mappings": [ - { - "if": { - "and": [ - "group_only=yes" - ] - }, - "then": { - "en": "This hostel is exclusively for groups", - "de": "Diese Unterkunft ist ausschließlich für Gruppen" - } - }, - { - "if": { - "and": [ - "group_only=no" - ] - }, - "then": { - "en": "This hostel is not exclusively for groups", - "de": "Diese Unterkunft ist nicht ausschließlich für Gruppen" - } - } - ], - "id": "group_only" - } ] } }