Merge pull request #1105 from pietervdvn/feature/toilet-at-amenity

Show toilets at amenities
This commit is contained in:
Pieter Vander Vennet 2022-10-18 19:15:25 +02:00 committed by GitHub
commit 98ab7a7945
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 514 additions and 140 deletions

View file

@ -82,49 +82,19 @@
"render": "{minimap(18): height: 5rem; overflow: hidden; border-radius:3rem; }"
},
{
"render": {
"en": "Opening Hours: {opening_hours_table()}",
"ru": "Часы работы: {opening_hours_table()}",
"zh_Hant": "開放時間:{opening_hours_table()}",
"id": "Jam Buka: {opening_hours_table()}",
"hu": "Nyitva tartás: {opening_hours_table()}",
"de": "Öffnungszeiten: {opening_hours_table()}",
"es": "Horas de Apertura: {opening_hours_table()}",
"nb_NO": "Åpningstider: {opening_hours_table()}",
"nl": "Openingsuren: {opening_hours_table()}",
"fr": "Heures douverture : {opening_hours_table()}"
},
"freeform": {
"key": "opening_hours",
"type": "opening_hours"
},
"question": {
"en": "What are the opening hours for this post office?",
"zh_Hant": "這間郵局的開放時間是?",
"id": "Jam berapa kantor pos ini buka?",
"hu": "Mikor van nyitva ez a posta?",
"de": "Wie sind die Öffnungszeiten dieser Poststelle?",
"es": "¿Cuáles son las horas de apertura para esta oficina de correos?",
"nl": "Wat zijn de openingsuren voor dit postkantoor?",
"fr": "Quelles sont les heures douverture de ce bureau de poste ?"
},
"mappings": [
{
"if": "opening_hours=24/7",
"then": {
"en": "24/7 opened (including holidays)",
"de": "durchgehend geöffnet (auch an Feiertagen)",
"zh_Hant": "24/7 開放 (包括假日)",
"id": "Buka 24 jam (termasuk hari libur)",
"hu": "Éjjel-nappal nyitva (munkaszüneti napokon is)",
"es": "Abierta 24/7 (incluyendo festivos)",
"nl": "24/7 open (ook tijdens feestdagen)",
"fr": "Ouvert 24h/24 (jours fériés compris)",
"nb_NO": "Døgnåpent (inkludert helligdager)"
}
"builtin": "opening_hours",
"override": {
"question": {
"en": "What are the opening hours for this post office?",
"zh_Hant": "這間郵局的開放時間是?",
"id": "Jam berapa kantor pos ini buka?",
"hu": "Mikor van nyitva ez a posta?",
"de": "Wie sind die Öffnungszeiten dieser Poststelle?",
"es": "¿Cuáles son las horas de apertura para esta oficina de correos?",
"nl": "Wat zijn de openingsuren voor dit postkantoor?",
"fr": "Quelles sont les heures douverture de ce bureau de poste ?"
}
],
"id": "OH"
}
},
{
"id": "post_partner",

View file

@ -237,34 +237,17 @@
}
},
{
"id": "Opening-hours",
"condition": "access!=no",
"question": {
"en": "When are these toilets opened?",
"nl": "Wanneer zijn deze toiletten open?",
"de": "Wann sind diese Toiletten geöffnet?",
"es": "",
"fr": "Quand ces toilettes sont-elles ouvertes ?",
"da": "Hvornår åbnes disse toiletter?"
},
"render": "{opening_hours_table()}",
"freeform": {
"key": "opening_hours",
"type": "opening_hours"
},
"mappings": [
{
"if": "opening_hours=24/7",
"then": {
"en": "Opened 24/7",
"nl": "Altijd open",
"de": "Durchgehend geöffnet",
"es": "Abierto 24/7",
"fr": "Ouvert 24h/24 et 7j/7",
"da": "Åbent 24/7"
}
"builtin": "opening_hours_24_7",
"override": {
"condition": "access!=no",
"question": {
"en": "When are these toilets opened?",
"nl": "Wanneer zijn deze toiletten open?",
"de": "Wann sind diese Toiletten geöffnet?",
"fr": "Quand ces toilettes sont-elles ouvertes ?",
"da": "Hvornår åbnes disse toiletter?"
}
]
}
},
{
"id": "toilets-wheelchair",
@ -315,6 +298,12 @@
},
{
"id": "wheelchair-door-width",
"condition": {
"or": [
"wheelchair=yes",
"wheelchair=designated"
]
},
"question": {
"en": "What is the width of the door to the wheelchair accessible toilet?",
"nl": "Hoe breed is de deur van de rolstoeltoegankelijke toilet?",
@ -640,27 +629,7 @@
}
]
},
{
"id": "is_open",
"options": [
{
"question": {
"nl": "Nu geopened",
"en": "Opened now",
"de": "Derzeit geöffnet",
"es": "Abierto ahora",
"fr": "Ouvert maintenant",
"da": "Åbnet nu"
},
"osmTags": {
"or": [
"opening_hours=",
"_isOpen=yes"
]
}
}
]
}
"open_now"
],
"deletion": {
"softDeletionTags": {
@ -673,7 +642,7 @@
},
"allowMove": {
"enableRelocation": false,
"enableImproveAccuraccy": true
"enableImproveAccuracy": true
},
"mapRendering": [
{
@ -756,4 +725,4 @@
]
}
]
}
}

View file

@ -0,0 +1,455 @@
{
"id": "toilet_at_amenity",
"name": {
"en": "Toilets at other amenities"
},
"minzoom": 12,
"source": {
"osmTags": "toilets=yes"
},
"title": {
"render": {
"en": "Toilet at amenity"
},
"mappings": [
{
"if": "name~*",
"then": {
"en": "Toilet at {name}"
}
}
]
},
"tagRenderings": [
"images",
"level",
{
"question": {
"en": "Are these toilets publicly accessible?"
},
"render": {
"en": "Access is {toilets:access}",
"de": "Zugang ist {toilets:access}",
"fr": "L'accès est {toilets:access}",
"nl": "Toegankelijkheid is {toilets:access}",
"it": "L'accesso è {toilets:access}",
"es": "El acceso es {toilets:access}",
"da": "Adgang er {toilets:access}"
},
"freeform": {
"key": "toilets:access",
"addExtraTags": [
"fixme=the tag toilets:access was filled out by the user and might need refinement"
]
},
"mappings": [
{
"if": "toilets:access=yes",
"then": {
"en": "Public access",
"de": "Der Zugang ist öffentlich",
"fr": "Accès publique",
"nl": "Publiek toegankelijk",
"it": "Accesso pubblico",
"ru": "Свободный доступ",
"es": "Acceso públic",
"da": "Offentlig adgang"
}
},
{
"if": "toilets:access=customers",
"then": {
"en": "Only access to customers of the amenity"
}
},
{
"if": "toilets:access=no",
"then": {
"en": "Not accessible, even for customers of the amenity"
}
},
{
"if": "toilets:access=key",
"then": {
"en": "Accessible, but one has to ask a key to enter",
"de": "Der Zugang ist möglich, aber man muss nach einen Schlüssel fragen",
"fr": "Accessible, mais vous devez demander la clé",
"nl": "Toegankelijk na het vragen van de sleutel",
"it": "Accessibile, ma occorre chiedere una chiave per accedere",
"es": "Accesible, pero hay que pedir la llave para entrar",
"da": "Tilgængelig, men man skal bede om en nøgle for at komme ind"
}
},
{
"if": "toilets:access=public",
"then": {
"en": "Public access",
"de": "Öffentlicher Zugang",
"fr": "Accès publique",
"nl": "Publiek toegankelijk",
"it": "Accesso pubblico",
"ru": "Свободный доступ",
"es": "De acceso público",
"da": "Offentlig adgang"
},
"hideInAnswer": true
}
],
"id": "toilet-access"
},
{
"id": "toilets-fee",
"condition": "toilets:access!=no",
"question": {
"en": "Are these toilets free to use?",
"de": "Können diese Toiletten kostenlos benutzt werden?",
"fr": "Ces toilettes sont-elles payantes ?",
"nl": "Zijn deze toiletten gratis te gebruiken?",
"it": "Questi servizi igienici sono gratuiti?",
"da": "Er det gratis at benytte disse toiletter?"
},
"mappings": [
{
"then": {
"en": "These are paid toilets",
"de": "Die Nutzung ist gebührenpflichtig",
"fr": "Toilettes payantes",
"nl": "Men moet betalen om deze toiletten te gebruiken",
"ru": "Это платные туалеты",
"it": "Questi servizi igienici sono a pagamento",
"es": "Estos son baños de pago",
"da": "Det er betalingstoiletter"
},
"if": "toilets:fee=yes"
},
{
"if": "toilets:fee=no",
"then": {
"en": "Free to use",
"de": "Die Nutzung ist kostenlos",
"fr": "Toilettes gratuites",
"nl": "Gratis te gebruiken",
"it": "Gratis",
"da": "Gratis at bruge"
}
}
]
},
{
"question": {
"en": "How much does one have to pay for these toilets?",
"de": "Wie viel muss man für die Nutzung bezahlen?",
"fr": "Quel est le prix d'accès de ces toilettes ?",
"nl": "Hoeveel moet men betalen om deze toiletten te gebruiken?",
"it": "Quanto costa l'accesso a questi servizi igienici?",
"ru": "Сколько стоит посещение туалета?",
"es": "¿Cuánto hay que pagar para estos baños?",
"da": "Hvor meget skal man betale for disse toiletter?"
},
"render": {
"en": "The fee is {toilets:charge}",
"de": "Die Gebühr beträgt {toilets:charge}",
"fr": "Le prix est {toilets:charge}",
"nl": "De toiletten gebruiken kost {toilets:charge}",
"it": "La tariffa è {toilets:charge}",
"ru": "Стоимость {toilets:charge}",
"es": "La tasa es {toilets:charge}",
"da": "Gebyret er {toilets:charge}"
},
"condition": "toilets:fee=yes",
"freeform": {
"key": "toilets:charge",
"type": "string"
},
"id": "toilet-charge"
},
{
"builtin": "opening_hours",
"override": {
"condition": "toilets:access!=no",
"question": {
"en": "When is the amenity where these toilets are located open?"
}
}
},
{
"id": "toilets-wheelchair",
"question": {
"en": "Is there a dedicated toilet for wheelchair users?",
"de": "Können Rollstuhlfahrer die Toilette benutzen?",
"fr": "Y a-t-il des toilettes réservées aux personnes en fauteuil roulant ?",
"nl": "Is er een rolstoeltoegankelijke toilet voorzien?",
"it": "C'è un WC riservato alle persone in sedia a rotelle",
"da": "Er der et særligt toilet til kørestolsbrugere?"
},
"mappings": [
{
"then": {
"en": "There is a dedicated toilet for wheelchair users",
"de": "Rollstuhlfahrer können die Toilette benutzen",
"fr": "Il y a des toilettes réservées pour les personnes à mobilité réduite",
"nl": "Er is een toilet voor rolstoelgebruikers",
"it": "C'è un WC riservato alle persone in sedia a rotelle",
"es": "Hay un baño dedicado para usuarios con sillas de ruedas",
"da": "Der er et særligt toilet til kørestolsbrugere"
},
"if": "toilets:wheelchair=yes"
},
{
"if": "toilets:wheelchair=no",
"then": {
"en": "No wheelchair access",
"de": "Rollstuhlfahrer können die Toilette nicht benutzen",
"fr": "Non accessible aux personnes à mobilité réduite",
"nl": "Niet toegankelijk voor rolstoelgebruikers",
"it": "Non accessibile in sedia a rotelle",
"ru": "Недоступно пользователям кресел-колясок",
"es": "Sin acceso para sillas de ruedas",
"da": "Ingen kørestolsadgang"
}
},
{
"if": "toilets:wheelchair=designated",
"then": {
"en": "There is only a dedicated toilet for wheelchair users",
"nl": "Er is alleen een toilet voor rolstoelgebruikers",
"de": "Es gibt nur eine barrierefreie Toilette für Rollstuhlfahrer",
"da": "Der er kun et særligt toilet til kørestolsbrugere"
}
}
]
},
{
"id": "wheelchair-door-width",
"condition": {
"or": [
"toilets:wheelchair=yes",
"toilets:wheelchair=designated"
]
},
"question": {
"en": "What is the width of the door to the wheelchair accessible toilet?",
"nl": "Hoe breed is de deur van de rolstoeltoegankelijke toilet?",
"fr": "Quelle est la largeur de la porte des toilettes accessibles aux fauteuils roulants ?",
"de": "Wie breit ist die Tür zur rollstuhlgerechten Toilette?",
"da": "Hvad er bredden på døren til det kørestolsvenlige toilet?"
},
"render": {
"en": "The door to the wheelchair-accessible toilet is {canonical(toilets:door:width)} wide",
"nl": "De deur naar de rolstoeltoegankelijke toilet is {canonical(toilets:door:width)} wide",
"fr": "La porte des toilettes accessibles aux fauteuils roulants a une large de {canonical(toilets:door:width)}",
"de": "Die Tür zur rollstuhlgerechten Toilette ist {canonical(toilets:door:width)} breit",
"da": "Døren til det kørestolsvenlige toilet er {canonical(toilets:door:width)} bred"
},
"freeform": {
"key": "toilets:door:width",
"type": "pfloat"
}
},
"toilet.toilets-type",
"toilet.toilets-changing-table",
"toilet.toilet-changing_table:location",
"toilet.toilet-handwashing",
"toilet.toilet-has-paper",
{
"builtin": "description",
"override": {
"render": "{toilets:description}",
"freeform": {
"key": "toilets:description",
"type": "string"
}
}
}
],
"filter": [
{
"id": "wheelchair",
"options": [
{
"question": {
"en": "Wheelchair accessible",
"nl": "Rolstoel toegankelijk",
"de": "Rollstuhlgerecht",
"es": "Accesible con sillas de ruedas",
"fr": "Accessible aux fauteuils roulants",
"da": "Tilgængelig for kørestolsbrugere"
},
"osmTags": {
"or": [
"toilets:wheelchair=yes",
"toilets:wheelchair=designated"
]
}
}
]
},
{
"id": "changing_table",
"options": [
{
"question": {
"en": "Has a changing table",
"nl": "Heeft een luiertafel",
"de": "Mit Wickeltisch",
"es": "Tiene un cambiador",
"fr": "A une table à langer",
"da": "Har et puslebord"
},
"osmTags": "changing_table=yes"
}
]
},
{
"id": "free",
"options": [
{
"question": {
"en": "Free to use",
"nl": "Gratis toegankelijk",
"de": "Nutzung kostenlos",
"fr": "Utilisation gratuite",
"da": "Gratis at bruge"
},
"osmTags": {
"or": [
"toilets:fee=no",
"toilets:fee=0",
"toilets:charge=0"
]
}
}
]
},
"open_now"
],
"deletion": {
"softDeletionTags": {
"and": [
"toilets=no",
"toilets:wheelchair=no"
]
},
"neededChangesets": 1
},
"mapRendering": [
{
"icon": {
"render": "./assets/layers/toilet/toilets.svg",
"mappings": [
{
"if": {
"or": [
"toilets:wheelchair=yes",
"toilets:wheelchair=designated"
]
},
"then": "circle:white;./assets/layers/toilet/wheelchair.svg"
},
{
"if": {
"or": [
"toilets:position=urinals",
"toilets:position=urinal"
]
},
"then": "./assets/layers/toilet/urinal.svg"
}
]
},
"iconBadges": [
{
"if": "opening_hours~*",
"then": "isOpen"
},
{
"if": "shop~*",
"then": "./assets/themes/shops/shop.svg"
},
{
"if": "amenity=restaurant",
"then": "circle:white;./assets/layers/food/restaurant.svg"
},
{
"if": {
"and": [
"amenity=fast_food",
"cuisine=friture"
]
},
"then": "circle:white;./assets/layers/food/fries.svg"
},
{
"if": {
"and": [
"amenity=fast_food",
"cuisine!=friture"
]
},
"then": "circle:white;./assets/layers/food/fastfood.svg"
},
{
"if": {
"or": [
"amenity=bar",
"amenity=pub",
"amenity=biergarten"
]
},
"then": "circle:white;./assets/layers/cafe_pub/pub.svg"
},
{
"if": "amenity=cafe",
"then": "circle:white;./assets/layers/cafe_pub/cafe.svg"
},
{
"if": "amenity=nightclub",
"then": "circle:white;./assets/layers/cafe_pub/nightclub.svg"
}
],
"location": [
"point",
"centroid"
]
}
],
"description": {
"en": "A layer showing (public) toilets located at different places."
},
"units": [
{
"appliesToKey": [
"toilets:door:width"
],
"applicableUnits": [
{
"canonicalDenomination": "m",
"alternativeDenomination": [
"meter"
],
"human": {
"en": "meter",
"nl": "meter",
"fr": "mètre",
"de": "Meter",
"da": "meter"
}
},
{
"canonicalDenomination": "cm",
"alternativeDenomination": [
"centimeter",
"cms"
],
"human": {
"en": "centimeter",
"nl": "centimeter",
"fr": "centimètre",
"de": "Zentimeter",
"da": "centimeter"
}
}
]
}
]
}

View file

@ -631,6 +631,27 @@
"type": "opening_hours"
}
},
"opening_hours_24_7": {
"builtin": "opening_hours",
"override": {
"mappings": [
{
"if": "opening_hours=24/7",
"then": {
"en": "24/7 opened (including holidays)",
"de": "durchgehend geöffnet (auch an Feiertagen)",
"zh_Hant": "24/7 開放 (包括假日)",
"id": "Buka 24 jam (termasuk hari libur)",
"hu": "Éjjel-nappal nyitva (munkaszüneti napokon is)",
"es": "Abierta 24/7 (incluyendo festivos)",
"nl": "24/7 open (ook tijdens feestdagen)",
"fr": "Ouvert 24h/24 (jours fériés compris)",
"nb_NO": "Døgnåpent (inkludert helligdager)"
}
}
]
}
},
"service:electricity": {
"#": "service:socket describes if a pub, restaurant or café offers electricity to their customers.",
"question": {
@ -1338,4 +1359,4 @@
"id": "Nama jaringan ini adalah <b>{internet_access:ssid}</b>"
}
}
}
}

View file

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

View file

@ -2240,13 +2240,6 @@
"question": "Gratis at bruge"
}
}
},
"3": {
"options": {
"0": {
"question": "Åbnet nu"
}
}
}
},
"name": "Toiletter",
@ -2976,4 +2969,4 @@
}
}
}
}
}

View file

@ -6587,13 +6587,6 @@
"question": "Nutzung kostenlos"
}
}
},
"3": {
"options": {
"0": {
"question": "Derzeit geöffnet"
}
}
}
},
"name": "Toiletten",

View file

@ -6709,13 +6709,6 @@
"question": "Free to use"
}
}
},
"3": {
"options": {
"0": {
"question": "Opened now"
}
}
}
},
"name": "Toilets",

View file

@ -3696,13 +3696,6 @@
"question": "Tiene un cambiador"
}
}
},
"3": {
"options": {
"0": {
"question": "Abierto ahora"
}
}
}
},
"name": "Baños",
@ -4026,4 +4019,4 @@
}
}
}
}
}

View file

@ -4032,13 +4032,6 @@
"question": "Utilisation gratuite"
}
}
},
"3": {
"options": {
"0": {
"question": "Ouvert maintenant"
}
}
}
},
"name": "Toilettes",
@ -4462,4 +4455,4 @@
}
}
}
}
}

View file

@ -6397,13 +6397,6 @@
"question": "Gratis toegankelijk"
}
}
},
"3": {
"options": {
"0": {
"question": "Nu geopened"
}
}
}
},
"name": "Toiletten",