Merge pull request #1487 from pietervdvn/feature/shower

Add shower layer to toilets theme
This commit is contained in:
Pieter Vander Vennet 2023-06-28 11:03:22 +02:00 committed by GitHub
commit d81ccd71cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 446 additions and 61 deletions

View file

@ -173,6 +173,27 @@
}
}
]
},
{
"id": "free",
"options": [
{
"question": {
"en": "Free to use",
"nl": "Gratis toegankelijk",
"de": "Nutzung kostenlos",
"fr": "Utilisation gratuite",
"da": "Gratis at bruge"
},
"osmTags": {
"or": [
"fee=no",
"fee=0",
"charge=0"
]
}
}
]
}
]
}
}

View file

@ -0,0 +1,12 @@
[
{
"path": "shower.svg",
"license": "CC0",
"authors": [
"James"
],
"sources": [
"https://github.com/gravitystorm/openstreetmap-carto/blob/master/symbols/amenity/shower.svg"
]
}
]

View file

@ -0,0 +1,187 @@
{
"id": "shower",
"name": {
"en": "Shower"
},
"minzoom": 12,
"source": {
"osmTags": "amenity=shower"
},
"title": {
"render": {
"en": "Shower"
}
},
"presets": [
{
"title": {
"en": "a shower"
},
"description": {
"en": "A (public) shower"
},
"tags": [
"amenity=shower"
]
}
],
"tagRenderings": [
"images",
"level",
{
"id": "access",
"question": {
"en": "Who can use this shower?"
},
"mappings": [
{
"if": "access=yes",
"then": {
"en": "Anyone can use this shower"
}
},
{
"if": "access=customers",
"then": {
"en": "Only customers can use this shower"
}
},
{
"if": "access=key",
"then": {
"en": "Accesible, but one has to ask for a key"
}
}
]
},
{
"id": "fee",
"question": {
"en": "Is there a fee for using this shower?"
},
"mappings": [
{
"if": "fee=yes",
"then": {
"en": "There is a fee for using this shower"
}
},
{
"if": "fee=no",
"then": {
"en": "This shower is free to use"
},
"addExtraTags": [
"charge="
]
}
]
},
{
"id": "charge",
"condition": "fee=yes",
"question": {
"en": "How much does it cost to use this shower?"
},
"freeform": {
"key": "charge",
"type": "string",
"placeholder": {
"en": "e.g. 1.50 EUR"
}
},
"render": {
"en": "It costs {charge} to use this shower"
}
},
"opening_hours",
{
"id": "hot_water",
"question": {
"en": "Does this shower have hot water available?"
},
"mappings": [
{
"if": "hot_water=yes",
"then": {
"en": "Hot water is available here"
}
},
{
"if": "hot_water=fee",
"then": {
"en": "Hot water is available here, but there is a fee"
}
},
{
"if": "hot_water=no",
"then": {
"en": "There is no hot water available here"
}
}
]
},
{
"builtin": "payment-options-split",
"override": {
"condition": {
"or": [
"fee=yes",
"hot_water=fee"
]
}
}
}
],
"filter": [
"free",
{
"id": "hot-water",
"options": [
{
"question": {
"en": "Hot water available"
},
"osmTags": {
"or": [
"hot_water=yes",
"hot_water=fee"
]
}
}
]
},
"open_now"
],
"deletion": {
"softDeletionTags": {
"and": [
"disused:amenity={amenity}",
"amenity="
]
},
"neededChangesets": 1
},
"allowMove": {
"enableImproveAccuracy": true,
"enableRelocation": false
},
"mapRendering": [
{
"icon": "circle:white;./assets/layers/shower/shower.svg",
"location": [
"point",
"centroid"
],
"iconBadges": [
{
"if": "opening_hours~*",
"then": "icons.isOpen"
}
]
}
],
"description": {
"en": "A layer showing (public) showers"
}
}

View file

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="25"
height="25"
viewBox="0 0 25 25"
version="1.1"
id="svg92"
sodipodi:docname="shower.svg"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs96" />
<sodipodi:namedview
id="namedview94"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#505050"
showgrid="false"
inkscape:zoom="16.857143"
inkscape:cx="7.029661"
inkscape:cy="7"
inkscape:window-width="2256"
inkscape:window-height="1435"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg92" />
<g
id="g389"
transform="translate(5.5,5.4999998)">
<path
d="M 6.8417969,0 C 6.5080632,0.00895547 6.214521,0.24656385 6.1503906,0.58789062 L 5.8476562,2.1933594 C 4.6012255,2.2351741 3.5074523,3.1334887 3.2675781,4.4101562 L 8.6171875,5.4160156 C 8.8407092,4.2264228 8.2526189,3.0728712 7.2441406,2.5234375 L 7.4375,1.5 H 14 V 0 Z"
id="path72" />
<circle
cx="5.3477998"
cy="7.8193002"
r="0.85500002"
id="circle74" />
<circle
cx="4.8835001"
cy="10.4283"
r="0.85500002"
id="circle76" />
<circle
cx="4.3322001"
cy="13.0403"
r="0.85500002"
id="circle78" />
<circle
cx="7.9656"
cy="7.7733998"
r="0.85500002"
id="circle80" />
<circle
cx="7.9252"
cy="10.4407"
r="0.85500002"
id="circle82" />
<circle
cx="7.9875002"
cy="13.145"
r="0.85500002"
id="circle84" />
<circle
cx="2.9883001"
cy="6.8755999"
r="0.85500002"
id="circle86" />
<circle
cx="1.9097"
cy="9.3199997"
r="0.85500002"
id="circle88" />
<circle
cx="0.85500002"
cy="11.7795"
r="0.85500002"
id="circle90" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View file

@ -241,7 +241,11 @@
"condition": "fee=yes",
"freeform": {
"key": "charge",
"type": "string"
"type": "string",
"placeholder": {
"en": "e.g. 0.50 EUR",
"nl": "bijv. 0.50 EUR"
}
},
"id": "toilet-charge"
},
@ -642,27 +646,7 @@
}
]
},
{
"id": "free",
"options": [
{
"question": {
"en": "Free to use",
"nl": "Gratis toegankelijk",
"de": "Nutzung kostenlos",
"fr": "Utilisation gratuite",
"da": "Gratis at bruge"
},
"osmTags": {
"or": [
"fee=no",
"fee=0",
"charge=0"
]
}
}
]
},
"free",
"open_now"
],
"deletion": {

View file

@ -344,7 +344,7 @@
"mapRendering": [
{
"icon": {
"render": "./assets/layers/toilet/toilets.svg",
"render": "circle:white;./assets/layers/toilet/toilets.svg",
"mappings": [
{
"if": {

View file

@ -978,7 +978,7 @@
},
{
"if": "payment:debit_cards=yes",
"ifnot": "payment_debit_cards=no",
"ifnot": "payment:debit_cards=no",
"icon": "./assets/tagRenderings/payment_card.svg",
"then": {
"en": "Debit cards are accepted here",

View file

@ -41,6 +41,7 @@
"icon": "./assets/themes/toilets/toilets.svg",
"layers": [
"toilet",
"toilet_at_amenity"
"toilet_at_amenity",
"shower"
]
}

View file

@ -2047,6 +2047,13 @@
"question": "Åbent nu"
}
}
},
"7": {
"options": {
"0": {
"question": "Gratis at bruge"
}
}
}
}
},
@ -2232,13 +2239,6 @@
"question": "Har et puslebord"
}
}
},
"2": {
"options": {
"0": {
"question": "Gratis at bruge"
}
}
}
},
"name": "Toiletter",

View file

@ -4474,6 +4474,13 @@
"question": "Bio-Produkte im Angebot"
}
}
},
"7": {
"options": {
"0": {
"question": "Nutzung kostenlos"
}
}
}
}
},
@ -8226,13 +8233,6 @@
"question": "Mit Wickeltisch"
}
}
},
"2": {
"options": {
"0": {
"question": "Nutzung kostenlos"
}
}
}
},
"name": "Toiletten",

View file

@ -4480,6 +4480,13 @@
"question": "Has organic options"
}
}
},
"7": {
"options": {
"0": {
"question": "Free to use"
}
}
}
}
},
@ -7512,6 +7519,76 @@
"render": "Shop"
}
},
"shower": {
"description": "A layer showing (public) showers",
"filter": {
"1": {
"options": {
"0": {
"question": "Hot water available"
}
}
}
},
"name": "Shower",
"presets": {
"0": {
"description": "A (public) shower",
"title": "a shower"
}
},
"tagRenderings": {
"access": {
"mappings": {
"0": {
"then": "Anyone can use this shower"
},
"1": {
"then": "Only customers can use this shower"
},
"2": {
"then": "Accesible, but one has to ask for a key"
}
},
"question": "Who can use this shower?"
},
"charge": {
"freeform": {
"placeholder": "e.g. 1.50 EUR"
},
"question": "How much does it cost to use this shower?",
"render": "It costs {charge} to use this shower"
},
"fee": {
"mappings": {
"0": {
"then": "There is a fee for using this shower"
},
"1": {
"then": "This shower is free to use"
}
},
"question": "Is there a fee for using this shower?"
},
"hot_water": {
"mappings": {
"0": {
"then": "Hot water is available here"
},
"1": {
"then": "Hot water is available here, but there is a fee"
},
"2": {
"then": "There is no hot water available here"
}
},
"question": "Does this shower have hot water available?"
}
},
"title": {
"render": "Shower"
}
},
"slow_roads": {
"description": "All carfree roads",
"tagRenderings": {
@ -7666,6 +7743,23 @@
}
},
"tagRenderings": {
"basketball-hoops": {
"mappings": {
"0": {
"then": "This basketball pitch has a single hoop"
},
"1": {
"then": "This basketball pitch has two hoops"
},
"2": {
"then": "This basketball pitch has four hoops"
},
"3": {
"then": "This basketball pitch has {hoops} hoops"
}
},
"question": "How much basketball hoops does this pitch have?"
},
"sport-pitch-access": {
"mappings": {
"0": {
@ -8277,13 +8371,6 @@
"question": "Has a changing table"
}
}
},
"2": {
"options": {
"0": {
"question": "Free to use"
}
}
}
},
"name": "Toilets",
@ -8342,6 +8429,9 @@
"render": "The changing table is located at {changing_table:location}"
},
"toilet-charge": {
"freeform": {
"placeholder": "e.g. 0.50 EUR"
},
"question": "How much does one have to pay for these toilets?",
"render": "The fee is {charge}"
},

View file

@ -3153,6 +3153,13 @@
"question": "Sans information sur le revêtement podotactile"
}
}
},
"7": {
"options": {
"0": {
"question": "Utilisation gratuite"
}
}
}
}
},
@ -5064,13 +5071,6 @@
"question": "A une table à langer"
}
}
},
"2": {
"options": {
"0": {
"question": "Utilisation gratuite"
}
}
}
},
"name": "Toilettes",

View file

@ -4365,6 +4365,13 @@
"question": "Heeft biologische opties"
}
}
},
"7": {
"options": {
"0": {
"question": "Gratis toegankelijk"
}
}
}
}
},
@ -7895,13 +7902,6 @@
"question": "Heeft een luiertafel"
}
}
},
"2": {
"options": {
"0": {
"question": "Gratis toegankelijk"
}
}
}
},
"name": "Toiletten",
@ -7960,6 +7960,9 @@
"render": "De luiertafel bevindt zich in {changing_table:location}"
},
"toilet-charge": {
"freeform": {
"placeholder": "bijv. 0.50 EUR"
},
"question": "Hoeveel moet men betalen om deze toiletten te gebruiken?",
"render": "De toiletten gebruiken kost {charge}"
},