Merge pull request 'layer_group_campsite' (#2305) from Osmwithspace/MapComplete:layer_scouting_groups into develop

Reviewed-on: MapComplete/MapComplete#2305
This commit is contained in:
Pieter Vander Vennet 2025-02-03 11:10:32 +01:00
commit e9e020dbd6
5 changed files with 341 additions and 1 deletions

View file

@ -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"
]
}
]
}

View file

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
id="svg2"
viewBox="0 0 30 30"
height="32"
width="32"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs8" />
<circle
style="fill:#552200;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:square;stroke-dasharray:none;paint-order:stroke fill markers;stop-color:#000000"
id="path961"
cx="15"
cy="15"
r="15" />
<rect
style="visibility:hidden;fill:none;stroke:none"
id="canvas"
y="23.5"
x="0"
height="14"
width="14" />
<circle
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0;stroke-linejoin:round;stroke-dasharray:none;paint-order:stroke fill markers;stop-color:#000000"
id="path1449-5-0-9-2-9"
cx="14.999711"
cy="15.000001"
r="12.65625" />
<path
style="fill:#552200;fill-opacity:1;stroke-width:1.77489"
d="m 6.8428091,9.483844 0.567334,1.70045 -3.4009021,6.23602 h 7.93647 l -3.4009009,-6.23602 0.565783,-1.70045 h -0.565783 l -0.567334,1.133117 -0.567333,-1.133117 z m 1.134667,3.968235 1.700451,3.400901 h -3.400902 z"
id="camping-5-6" />
<path
style="fill:#552200;fill-opacity:1;stroke-width:1.77488"
d="m 12.234371,7.741551 0.567334,1.70045 -3.4009019,6.236019 H 17.337274 L 13.936372,9.442001 14.502156,7.741551 H 13.936372 L 13.369039,8.874668 12.801705,7.741551 Z m 1.134668,3.968234 1.70045,3.400902 h -3.400901 z"
id="camping-5-6-92" />
<path
style="fill:#552200;fill-opacity:1;stroke-width:1.77488"
d="m 19.531338,5.284174 0.567334,1.700452 -3.400902,6.236019 h 7.936471 L 21.233339,6.984626 21.799123,5.284174 H 21.233339 L 20.666006,6.417292 20.098672,5.284174 Z m 1.134668,3.968236 1.700451,3.400901 h -3.400902 z"
id="camping-5-6-02" />
<path
style="fill:#552200;fill-opacity:1;stroke-width:1.77488"
d="m 13.865333,17.73558 0.567334,1.700451 -3.400902,6.23602 h 7.93647 l -3.400901,-6.23602 0.565783,-1.700451 H 15.567334 L 15,18.868698 14.432667,17.73558 Z M 15,21.703816 l 1.700451,3.400901 h -3.400902 z"
id="camping-5-6-3" />
<path
style="fill:#552200;fill-opacity:1;stroke-width:1.77488"
d="m 18.360294,14.139291 0.567334,1.700451 -3.400902,6.23602 h 7.93647 l -3.400901,-6.23602 0.565784,-1.700451 h -0.565784 l -0.567334,1.133118 -0.567333,-1.133118 z m 1.134667,3.968236 1.700451,3.400902 h -3.400901 z"
id="camping-5-6-7" />
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View file

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: Sven Geggus
SPDX-License-Identifier: CC0-1.0

View file

@ -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"
]
}
]

View file

@ -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
}
}
]
}