From c0920bff9f112f33aab903c3441408490089869c Mon Sep 17 00:00:00 2001 From: Osmwithspace <> Date: Mon, 27 Jan 2025 14:48:22 +0100 Subject: [PATCH 1/5] copy from mapcomplete studio --- .../layers/group_campsite/group_campsite.json | 235 ++++++++++++++++++ 1 file changed, 235 insertions(+) create mode 100644 assets/layers/group_campsite/group_campsite.json diff --git a/assets/layers/group_campsite/group_campsite.json b/assets/layers/group_campsite/group_campsite.json new file mode 100644 index 0000000000..2e1d4c740a --- /dev/null +++ b/assets/layers/group_campsite/group_campsite.json @@ -0,0 +1,235 @@ +{ + "credits": "Osmwithspace", + "minzoom": 7, + "filter": [ + { + "id": "capacity_persons_filter", + "options": [ + { + "question": { + "en": "persons", + "de": "Personen" + } + }, + { + "question": { + "en": "1-20" + }, + "osmTags": { + "and": [ + "capacity:persons>=1", + "capacity:persons<=20" + ] + } + }, + { + "question": { + "en": "21-50" + }, + "osmTags": { + "and": [ + "capacity:persons>=21", + "capacity:persons<=50" + ] + } + }, + { + "question": { + "en": "51-100" + }, + "osmTags": { + "and": [ + "capacity:persons>=51", + "capacity:persons<=100" + ] + } + }, + { + "question": { + "en": "101-200" + }, + "osmTags": { + "and": [ + "capacity:persons>=101", + "capacity:persons<=200" + ] + } + }, + { + "question": { + "en": "201-500" + }, + "osmTags": { + "and": [ + "capacity:persons>=201", + "capacity:persons<=500" + ] + } + }, + { + "question": { + "en": "500+" + }, + "osmTags": "capacity:persons>=501" + }, + { + "question": { + "en": "?" + }, + "osmTags": "capacity:persons=" + } + ] + } + ], + "pointRendering": [ + { + "location": [ + "point", + "centroid" + ], + "marker": [ + { + "icon": { + "render": "https://opencampingmap.org/markers/l_standard.svg", + "mappings": [ + { + "if": { + "or": [ + "scout=yes", + "group_only=yes" + ] + }, + "then": "https://wiki.openstreetmap.org/w/images/6/6b/OCM_l_group_only.svg" + } + ] + } + } + ] + } + ], + "tagRenderings": [ + { + "question": { + "de": "Wie heißt dieser Zeltplatz?", + "en": "What is the name of this campsite?" + }, + "render": { + "en": "The name of this campsite is {name}", + "de": "Dieser Zeltplatz heißt {name}" + }, + "freeform": { + "key": "name" + }, + "id": "Name" + }, + { + "id": "fee", + "question": { + "en": "Is a fee charged here?", + "de": "Wird hier eine Gebühr erhoben?" + }, + "render": { + "en": "A fee of {charge} should be paid for here", + "de": "Hier wird eine Gebühr von {charge} erhoben" + }, + "freeform": { + "key": "charge", + "type": "currency", + "addExtraTags": [ + "fee=yes" + ], + "inline": true + }, + "mappings": [ + { + "if": "fee=no", + "addExtraTags": [ + "charge=" + ], + "then": { + "en": "The campsite is free of charge", + "de": "Der Zeltplatz ist kostenlos" + } + }, + { + "if": { + "and": [ + "fee=yes", + "charge=" + ] + }, + "then": { + "en": "A fee is charged here.", + "de": "Hier wird eine Gebühr erhoben." + }, + "hideInAnswer": "charge~*" + } + ] + }, + { + "question": { + "de": "Wie viele Personen können hier übernachten?", + "en": "How many people can stay here?" + }, + "render": { + "en": "{capacity:persons} people can stay here", + "de": "Hier können {capacity:persons} Personen übernachten" + }, + "freeform": { + "key": "capacity:persons", + "type": "pnat" + }, + "id": "capacity:persons" + }, + "contact", + "questions", + "mastodon", + "images" + ], + "lineRendering": [ + { + "width": 1, + "color": "blue" + } + ], + "credits:uid": 8770388, + "id": "groupcampsites", + "name": { + "en": "Campsites for groups and scouts", + "de": "Zeltplatz für Gruppen/Pfadfinder:innen" + }, + "description": { + "en": "Campsites for groups and scouts", + "de": "Zeltplatz für Gruppen/Pfadfinder:innen" + }, + "title": { + "render": { + "en": "{name}" + } + }, + "source": { + "osmTags": { + "and": [ + "tourism=camp_site", + { + "or": [ + "scout=yes", + "group_only=yes" + ] + } + ] + } + }, + "shownByDefault": true, + "presets": [ + { + "title": { + "en": "campsite for groups" + }, + "tags": [ + "tourism=camp_site", + "group_only=yes" + ] + } + ] +} \ No newline at end of file From 19941d492e63d14d5421cf6cc4c41f73ab12ca68 Mon Sep 17 00:00:00 2001 From: Osmwithspace <> Date: Mon, 3 Feb 2025 02:18:10 +0100 Subject: [PATCH 2/5] image changed --- .../layers/group_campsite/group_campsite.json | 12 +--- .../layers/group_campsite/group_campsite.svg | 65 +++++++++++++++++++ .../group_campsite/group_campsite.svg.license | 2 + .../layers/group_campsite/license_info.json | 12 ++++ 4 files changed, 80 insertions(+), 11 deletions(-) create mode 100644 assets/layers/group_campsite/group_campsite.svg create mode 100644 assets/layers/group_campsite/group_campsite.svg.license create mode 100644 assets/layers/group_campsite/license_info.json diff --git a/assets/layers/group_campsite/group_campsite.json b/assets/layers/group_campsite/group_campsite.json index 2e1d4c740a..09477c3665 100644 --- a/assets/layers/group_campsite/group_campsite.json +++ b/assets/layers/group_campsite/group_campsite.json @@ -90,17 +90,7 @@ "marker": [ { "icon": { - "render": "https://opencampingmap.org/markers/l_standard.svg", - "mappings": [ - { - "if": { - "or": [ - "scout=yes", - "group_only=yes" - ] - }, - "then": "https://wiki.openstreetmap.org/w/images/6/6b/OCM_l_group_only.svg" - } + "render": "./assets/layers/group_campsite/group_campsite.svg", ] } } diff --git a/assets/layers/group_campsite/group_campsite.svg b/assets/layers/group_campsite/group_campsite.svg new file mode 100644 index 0000000000..a41a68d3ea --- /dev/null +++ b/assets/layers/group_campsite/group_campsite.svg @@ -0,0 +1,65 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/assets/layers/group_campsite/group_campsite.svg.license b/assets/layers/group_campsite/group_campsite.svg.license new file mode 100644 index 0000000000..e8792752d9 --- /dev/null +++ b/assets/layers/group_campsite/group_campsite.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: Sven Geggus +SPDX-License-Identifier: CC0-1.0 \ No newline at end of file diff --git a/assets/layers/group_campsite/license_info.json b/assets/layers/group_campsite/license_info.json new file mode 100644 index 0000000000..fb972c320f --- /dev/null +++ b/assets/layers/group_campsite/license_info.json @@ -0,0 +1,12 @@ +[ + { + "path": "group_campsite.svg", + "license": "CC0-1.0", + "authors": [ + "Sven Geggus" + ], + "sources": [ + "https://github.com/giggls/opencampsitemap/blob/master/markers/l_group_only.svg" + ] + } +] \ No newline at end of file From c0fe38d27668f56d0c3ea0b4e74ee28c36c10f03 Mon Sep 17 00:00:00 2001 From: Osmwithspace <> Date: Mon, 3 Feb 2025 02:22:09 +0100 Subject: [PATCH 3/5] edit ids --- assets/layers/group_campsite/group_campsite.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/layers/group_campsite/group_campsite.json b/assets/layers/group_campsite/group_campsite.json index 09477c3665..c1af757b66 100644 --- a/assets/layers/group_campsite/group_campsite.json +++ b/assets/layers/group_campsite/group_campsite.json @@ -110,7 +110,7 @@ "freeform": { "key": "name" }, - "id": "Name" + "id": "name" }, { "id": "fee", @@ -169,7 +169,7 @@ "key": "capacity:persons", "type": "pnat" }, - "id": "capacity:persons" + "id": "capacity_persons" }, "contact", "questions", @@ -183,7 +183,7 @@ } ], "credits:uid": 8770388, - "id": "groupcampsites", + "id": "group_campsite", "name": { "en": "Campsites for groups and scouts", "de": "Zeltplatz für Gruppen/Pfadfinder:innen" From e80fa80867339e3cd070a87a857b0261ed7cfb22 Mon Sep 17 00:00:00 2001 From: Osmwithspace <> Date: Mon, 3 Feb 2025 02:37:05 +0100 Subject: [PATCH 4/5] change from group_campsite to campsite --- .../campsite.json} | 28 ++++++++++--------- .../campsite.svg} | 0 .../campsite.svg.license} | 0 .../license_info.json | 2 +- 4 files changed, 16 insertions(+), 14 deletions(-) rename assets/layers/{group_campsite/group_campsite.json => campsite/campsite.json} (90%) rename assets/layers/{group_campsite/group_campsite.svg => campsite/campsite.svg} (100%) rename assets/layers/{group_campsite/group_campsite.svg.license => campsite/campsite.svg.license} (100%) rename assets/layers/{group_campsite => campsite}/license_info.json (84%) diff --git a/assets/layers/group_campsite/group_campsite.json b/assets/layers/campsite/campsite.json similarity index 90% rename from assets/layers/group_campsite/group_campsite.json rename to assets/layers/campsite/campsite.json index c1af757b66..49f13e5edb 100644 --- a/assets/layers/group_campsite/group_campsite.json +++ b/assets/layers/campsite/campsite.json @@ -90,7 +90,7 @@ "marker": [ { "icon": { - "render": "./assets/layers/group_campsite/group_campsite.svg", + "render": "./assets/layers/campsite/campsite.svg", ] } } @@ -183,14 +183,14 @@ } ], "credits:uid": 8770388, - "id": "group_campsite", + "id": "campsite", "name": { - "en": "Campsites for groups and scouts", - "de": "Zeltplatz für Gruppen/Pfadfinder:innen" + "en": "Campsites", + "de": "Zeltplätze" }, "description": { - "en": "Campsites for groups and scouts", - "de": "Zeltplatz für Gruppen/Pfadfinder:innen" + "en": "Campsites", + "de": "Zeltplätze" }, "title": { "render": { @@ -200,18 +200,20 @@ "source": { "osmTags": { "and": [ - "tourism=camp_site", - { - "or": [ - "scout=yes", - "group_only=yes" - ] - } + "tourism=camp_site" ] } }, "shownByDefault": true, "presets": [ + { + "title": { + "en": "campsite" + }, + "tags": [ + "tourism=camp_site" + ] + }, { "title": { "en": "campsite for groups" diff --git a/assets/layers/group_campsite/group_campsite.svg b/assets/layers/campsite/campsite.svg similarity index 100% rename from assets/layers/group_campsite/group_campsite.svg rename to assets/layers/campsite/campsite.svg diff --git a/assets/layers/group_campsite/group_campsite.svg.license b/assets/layers/campsite/campsite.svg.license similarity index 100% rename from assets/layers/group_campsite/group_campsite.svg.license rename to assets/layers/campsite/campsite.svg.license diff --git a/assets/layers/group_campsite/license_info.json b/assets/layers/campsite/license_info.json similarity index 84% rename from assets/layers/group_campsite/license_info.json rename to assets/layers/campsite/license_info.json index fb972c320f..951e90bfb7 100644 --- a/assets/layers/group_campsite/license_info.json +++ b/assets/layers/campsite/license_info.json @@ -1,6 +1,6 @@ [ { - "path": "group_campsite.svg", + "path": "campsite.svg", "license": "CC0-1.0", "authors": [ "Sven Geggus" From 582bdf39f27cd7941cd060a3be75b653fb16cb7a Mon Sep 17 00:00:00 2001 From: Osmwithspace <> Date: Mon, 3 Feb 2025 02:55:51 +0100 Subject: [PATCH 5/5] add group_campsite --- assets/themes/scouting/scouting.json | 36 +++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/assets/themes/scouting/scouting.json b/assets/themes/scouting/scouting.json index 068ed8e5b3..9874814b27 100644 --- a/assets/themes/scouting/scouting.json +++ b/assets/themes/scouting/scouting.json @@ -11,6 +11,40 @@ "icon": "./assets/layers/scouting_group/scouting.svg", "defaultBackgroundId": "protomaps.dark", "layers": [ - "scouting_group" + "scouting_group", + { + "builtin": "campsite", + "override": { + "id": "group_campsite", + "name": { + "en": "Group Campsites" + }, + "=presets": [], + "source": { + "=osmTags": { + "and": [ + "tourism=camp_site", + { + "or": [ + "scout=yes", + "group_only=yes" + ] + } + ] + + } + }, + "=filter": [] + } + }, + { + "builtin": "campsite", + "override": { + "minzoom": 18, + "filter": null, + "name": null, + "isCounted": false + } + } ] }