diff --git a/assets/layers/campsite/campsite.json b/assets/layers/campsite/campsite.json new file mode 100644 index 0000000000..49f13e5edb --- /dev/null +++ b/assets/layers/campsite/campsite.json @@ -0,0 +1,227 @@ +{ + "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": "./assets/layers/campsite/campsite.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": "campsite", + "name": { + "en": "Campsites", + "de": "Zeltplätze" + }, + "description": { + "en": "Campsites", + "de": "Zeltplätze" + }, + "title": { + "render": { + "en": "{name}" + } + }, + "source": { + "osmTags": { + "and": [ + "tourism=camp_site" + ] + } + }, + "shownByDefault": true, + "presets": [ + { + "title": { + "en": "campsite" + }, + "tags": [ + "tourism=camp_site" + ] + }, + { + "title": { + "en": "campsite for groups" + }, + "tags": [ + "tourism=camp_site", + "group_only=yes" + ] + } + ] +} \ No newline at end of file diff --git a/assets/layers/campsite/campsite.svg b/assets/layers/campsite/campsite.svg new file mode 100644 index 0000000000..a41a68d3ea --- /dev/null +++ b/assets/layers/campsite/campsite.svg @@ -0,0 +1,65 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/assets/layers/campsite/campsite.svg.license b/assets/layers/campsite/campsite.svg.license new file mode 100644 index 0000000000..e8792752d9 --- /dev/null +++ b/assets/layers/campsite/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/campsite/license_info.json b/assets/layers/campsite/license_info.json new file mode 100644 index 0000000000..951e90bfb7 --- /dev/null +++ b/assets/layers/campsite/license_info.json @@ -0,0 +1,12 @@ +[ + { + "path": "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 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 + } + } ] }