forked from MapComplete/MapComplete
Merge pull request 'add sauna theme' (#2382) from Osmwithspace/MapComplete:sauna into develop
Reviewed-on: MapComplete/MapComplete#2382
This commit is contained in:
commit
e97adedd6a
16 changed files with 718 additions and 39 deletions
|
@ -690,37 +690,7 @@
|
|||
],
|
||||
"id": "defibrillator-survey:date"
|
||||
},
|
||||
{
|
||||
"render": {
|
||||
"en": "Extra information for OpenStreetMap experts: {fixme}",
|
||||
"nl": "Extra informatie voor OpenStreetMap experts: {fixme}",
|
||||
"fr": "Informations supplémentaires pour les experts d'OpenStreetMap : {fixme}",
|
||||
"it": "Informazioni aggiuntive per gli esperti di OpenStreetMap: {fixme}",
|
||||
"de": "Zusätzliche Informationen für OpenStreetMap-Experten: {fixme}",
|
||||
"ru": "Дополнительная информация для экспертов OpenStreetMap: {fixme}",
|
||||
"sl": "Dodatne informacije za OpenStreetMap strokovnjake: {fixme}",
|
||||
"es": "Información adicional para expertos de OpenStreetMap: {fixme}",
|
||||
"ca": "Informació addicional per als experts en OpenStreetMap: {fixme}",
|
||||
"pl": "Więcej informacji dla doświadczonych użytkowników OpenStreetMap: {fixme}",
|
||||
"cs": "Další informace pro experty OpenStreetMap: {fixme}"
|
||||
},
|
||||
"question": {
|
||||
"en": "Is there something wrong with how this is mapped, that you weren't able to fix here? (leave a note to OpenStreetMap experts)",
|
||||
"nl": "Is er iets mis met de informatie over deze defibrillator dat je hier niet opgelost kreeg? (laat hier een berichtje achter voor OpenStreetMap experts)",
|
||||
"fr": "Y a-t-il quelque chose qui ne va pas dans la manière dont ça a été cartographié, et que vous n'avez pas pu réparer ici ? (laisser une note pour les experts d'OpenStreetMap)",
|
||||
"it": "C'è qualcosa di sbagliato nel modo in cui è mappato, che non sei riuscito a correggere qui? (lascia una nota agli esperti di OpenStreetMap)",
|
||||
"de": "Gibt es einen Fehler in der Kartierung, den Sie hier nicht beheben konnten? (hinterlasse eine Notiz für OpenStreetMap-Experten)",
|
||||
"sl": "Ali je kaj narobe s tem vnosom na zemljevid, in tega niste mogli sami popraviti tu? (pustite opombo OpenStreetMap strokovnjakom)",
|
||||
"es": "¿Hay algo mal en cómo está mapeado esto, que no hayas podido arreglar aquí? (deja una nota para los expertos de OpenStreetMap)",
|
||||
"ca": "Hi ha alguna cosa malament en la manera de com està mapejat això, que no heu pogut solucionar aquí? (deixeu una nota als experts d'OpenStreetMap)",
|
||||
"cs": "Je na tom, jak je to zmapováno, něco v nepořádku, co jste zde nedokázali opravit? (zanechte poznámku odborníkům na OpenStreetMap)"
|
||||
},
|
||||
"freeform": {
|
||||
"key": "fixme",
|
||||
"type": "text"
|
||||
},
|
||||
"id": "defibrillator-fixme"
|
||||
}
|
||||
"fixme"
|
||||
],
|
||||
"filter": [
|
||||
"has_image",
|
||||
|
|
|
@ -772,6 +772,36 @@
|
|||
"cs": "Neopakujte již uvedená fakta"
|
||||
}
|
||||
},
|
||||
{
|
||||
"render": {
|
||||
"en": "Extra information for OpenStreetMap experts: {fixme}",
|
||||
"nl": "Extra informatie voor OpenStreetMap experts: {fixme}",
|
||||
"fr": "Informations supplémentaires pour les experts d'OpenStreetMap : {fixme}",
|
||||
"it": "Informazioni aggiuntive per gli esperti di OpenStreetMap: {fixme}",
|
||||
"de": "Zusätzliche Informationen für OpenStreetMap-Experten: {fixme}",
|
||||
"ru": "Дополнительная информация для экспертов OpenStreetMap: {fixme}",
|
||||
"sl": "Dodatne informacije za OpenStreetMap strokovnjake: {fixme}",
|
||||
"es": "Información adicional para expertos de OpenStreetMap: {fixme}",
|
||||
"ca": "Informació addicional per als experts en OpenStreetMap: {fixme}",
|
||||
"pl": "Więcej informacji dla doświadczonych użytkowników OpenStreetMap: {fixme}",
|
||||
"cs": "Další informace pro experty OpenStreetMap: {fixme}"
|
||||
},
|
||||
"question": {
|
||||
"en": "Is there something wrong with how this is mapped, that you weren't able to fix here? (leave a note to OpenStreetMap experts)",
|
||||
"fr": "Y a-t-il quelque chose qui ne va pas dans la manière dont ça a été cartographié, et que vous n'avez pas pu réparer ici ? (laisser une note pour les experts d'OpenStreetMap)",
|
||||
"it": "C'è qualcosa di sbagliato nel modo in cui è mappato, che non sei riuscito a correggere qui? (lascia una nota agli esperti di OpenStreetMap)",
|
||||
"de": "Gibt es einen Fehler in der Kartierung, den Sie hier nicht beheben konnten? (hinterlasse eine Notiz für OpenStreetMap-Experten)",
|
||||
"sl": "Ali je kaj narobe s tem vnosom na zemljevid, in tega niste mogli sami popraviti tu? (pustite opombo OpenStreetMap strokovnjakom)",
|
||||
"es": "¿Hay algo mal en cómo está mapeado esto, que no hayas podido arreglar aquí? (deja una nota para los expertos de OpenStreetMap)",
|
||||
"ca": "Hi ha alguna cosa malament en la manera de com està mapejat això, que no heu pogut solucionar aquí? (deixeu una nota als experts d'OpenStreetMap)",
|
||||
"cs": "Je na tom, jak je to zmapováno, něco v nepořádku, co jste zde nedokázali opravit? (zanechte poznámku odborníkům na OpenStreetMap)"
|
||||
},
|
||||
"freeform": {
|
||||
"key": "fixme",
|
||||
"type": "text"
|
||||
},
|
||||
"id": "fixme"
|
||||
},
|
||||
{
|
||||
"id": "opening_hours",
|
||||
"question": {
|
||||
|
|
12
assets/layers/sauna/license_info.json
Normal file
12
assets/layers/sauna/license_info.json
Normal file
|
@ -0,0 +1,12 @@
|
|||
[
|
||||
{
|
||||
"path": "sauna.svg",
|
||||
"license": "CC0-1.0",
|
||||
"authors": [
|
||||
"Geozeisig"
|
||||
],
|
||||
"sources": [
|
||||
"https://wiki.openstreetmap.org/wiki/File:Sauna-14.svg"
|
||||
]
|
||||
}
|
||||
]
|
52
assets/layers/sauna/sauna.json
Normal file
52
assets/layers/sauna/sauna.json
Normal file
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
"id": "sauna",
|
||||
"name": {
|
||||
"en": "Sauna"
|
||||
},
|
||||
"description": {
|
||||
"en": "A sauna is a small room or house designed as a place to experience dry or wet heat sessions, or an establishment with one or more of these and auxiliary facilities."
|
||||
},
|
||||
"source": {
|
||||
"osmTags": {
|
||||
"and": [
|
||||
"leisure=sauna"
|
||||
]
|
||||
}
|
||||
},
|
||||
"minzoom": 8,
|
||||
"title": {
|
||||
"render": {
|
||||
"en": "{name}"
|
||||
}
|
||||
},
|
||||
"pointRendering": [
|
||||
{
|
||||
"location": [
|
||||
"point",
|
||||
"centroid"
|
||||
],
|
||||
"marker": [
|
||||
{
|
||||
"icon": "./assets/layers/sauna/sauna.svg"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"lineRendering": [
|
||||
{
|
||||
"width": 1,
|
||||
"color": "blue"
|
||||
}
|
||||
],
|
||||
"tagRenderings": [
|
||||
"images",
|
||||
"reviews",
|
||||
"opening_hours",
|
||||
"contact",
|
||||
"sauna_at_leisure.sauna_expanded",
|
||||
"fixme"
|
||||
],
|
||||
"allowMove": true,
|
||||
"credits": "Osmwithspace",
|
||||
"credits:uid": 8770388
|
||||
}
|
26
assets/layers/sauna/sauna.svg
Normal file
26
assets/layers/sauna/sauna.svg
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" id="svg4644" width="14" height="14" viewBox="0 0 14 14" version="1.1">
|
||||
<defs id="defs4648"/>
|
||||
<metadata id="metadata4616">
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
<dc:title/>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<path id="path4618" visibility="hidden" fill="none" d="m0 0v14h14v-3.0879c-0.60296-0.26883-0.76534-0.32352-0.7168-0.98047-0.21853-0.61728-0.35897-1.263-0.48242-1.9062-0.0093-0.048426 0.08558-0.048509 0.125-0.078125 0.02694-0.020238 0.05602-0.041951 0.07422-0.070312 0.0042-0.00659-0.01311-0.00918-0.01953-0.013672 0.0035-0.076059 0.01266-0.074037 0.08594-0.16211-0.03731-0.10155-0.06732-0.20749-0.11133-0.30469 0.19347-0.13603 0.37109-0.29748 0.58008-0.4082 0.01355-0.00718 0.03058-0.00476 0.04492-0.00977 0.03638-0.02021 0.13456-0.045363 0.1875-0.066406 0.076901-0.030559 0.15476-0.059081 0.23242-0.087887v-6.8242z"/>
|
||||
<path id="path4620" visibility="hidden" fill="none" d="m13.068 7.9492c-0.02009 0.010037-0.04307 0.024603-0.06055 0.029297l0.09766-0.027344c-0.0084-0.00964-0.01975-0.010628-0.03711-0.00195z"/>
|
||||
<path id="path4622" visibility="hidden" fill="none" d="m13.979 9.9258c-0.05456 0.053192-0.10755 0.095946-0.13281 0.046875-6.67e-4 -0.0013-0.0013-0.00261-2e-3 -0.00391-0.06841 0.036743-0.14969 0.089871-0.22656 0.13672 0.0757 0.1435 0.19358 0.26645 0.33203 0.37695 0.01102-0.01701 0.03821-0.04094 0.05078-0.05859v-0.45508c-0.0051-0.017731-9e-3 -0.037605-0.02148-0.042969z"/>
|
||||
<path style="fill:#0E8517" id="path4624" d="m0.82924 10.095h3.3722l-0.44665 3.9051h-2.5459z"/>
|
||||
<path style="fill:#0E8517;stroke:#0E8517;stroke-opacity:1" id="path4626" stroke-width=".086943" stroke="#030305" d="m1.3678 0.069465c-3.9978 2.6001 3.2253 3.0269-1.2178 6.1111l0.87772-0.01179c4.1676-3.2915-3.0949-3.5323 1.3044-6.1262z"/>
|
||||
<path style="fill:#0E8517;stroke:#0E8517;stroke-opacity:1" id="path4628" stroke-width=".086943" stroke="#030305" d="m4.4017 0.070365c-3.9978 2.6001 3.2253 3.0269-1.2178 6.1111l0.87772-0.01179c4.1676-3.2915-3.0949-3.5323 1.3044-6.1262z"/>
|
||||
<circle id="circle4630" style="paint-order:stroke fill markers;fill:#0E8517" r="1.3921" cy="2.2245" cx="10.209"/>
|
||||
<rect id="rect4632" style="paint-order:stroke fill markers;fill:#0E8517" ry=".6888" height="1.3776" width="5.3022" y="13.111" x="-5.3508" transform="matrix(.6376 -.77037 .71155 .70264 0 0)"/>
|
||||
<rect id="rect4634" style="paint-order:stroke fill markers;fill:#0E8517" ry=".48114" height=".96227" width="3.755" y="9.5685" x="3.7086" transform="matrix(.94618 -.32365 .32524 .94563 0 0)"/>
|
||||
<rect id="rect4636" style="paint-order:stroke fill markers;fill:#0E8517" ry=".47564" height=".95127" width="3.7087" y="-12.573" x="-1.4435" transform="matrix(-.45288 .89157 -.88823 -.4594 0 0)"/>
|
||||
<rect id="rect4638" style="paint-order:stroke fill markers;fill:#0E8517" ry=".64314" height="1.2863" width="5.285" y="9.4976" x="8.7215" transform="matrix(1 .0017978 -.00063981 1 0 0)"/>
|
||||
<rect id="rect4640" style="paint-order:stroke fill markers;fill:#0E8517" height=".7292" width="3.409" y="12.1" x="10.591"/>
|
||||
<rect id="rect4642" style="paint-order:stroke fill markers;fill:#0E8517" ry=".66257" height="1.3251" width="7.0859" y="-9.7823" x="7.6403" transform="matrix(.33821 .94107 -.94088 .33873 0 0)"/>
|
||||
</svg>
|
After Width: | Height: | Size: 3.5 KiB |
2
assets/layers/sauna/sauna.svg.license
Normal file
2
assets/layers/sauna/sauna.svg.license
Normal file
|
@ -0,0 +1,2 @@
|
|||
SPDX-FileCopyrightText: Geozeisig
|
||||
SPDX-License-Identifier: CC0-1.0
|
324
assets/layers/sauna_at_leisure/sauna_at_leisure.json
Normal file
324
assets/layers/sauna_at_leisure/sauna_at_leisure.json
Normal file
|
@ -0,0 +1,324 @@
|
|||
{
|
||||
"id": "sauna_at_leisure",
|
||||
"name": {
|
||||
"en": "Saunas at other amenities",
|
||||
"de": "Saunen in anderen Einrichtungen"
|
||||
},
|
||||
"description": {
|
||||
"en": "A sauna is a small room or house designed as a place to experience dry or wet heat sessions, or an establishment with one or more of these and auxiliary facilities."
|
||||
},
|
||||
"#": "Use 'sauna_at_leisure.sauna_grouped' in a layer.tagRenderings to add the 'sauna information' expandle block (incl 'has sauna'); use 'sauna_at_leisure.expanded' to get all sauna questions directly (which does _not_ include the 'has sauna' question)",
|
||||
"source": {
|
||||
"osmTags": {
|
||||
"or": [
|
||||
"sauna=yes"
|
||||
]
|
||||
}
|
||||
},
|
||||
"minzoom": 8,
|
||||
"title": {
|
||||
"render": {
|
||||
"en": "{name}"
|
||||
}
|
||||
},
|
||||
"pointRendering": [
|
||||
{
|
||||
"location": [
|
||||
"point",
|
||||
"centroid"
|
||||
],
|
||||
"marker": [
|
||||
{
|
||||
"icon": "./assets/layers/sauna/sauna.svg"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"lineRendering": [
|
||||
{
|
||||
"width": 1,
|
||||
"color": "blue"
|
||||
}
|
||||
],
|
||||
"tagRenderings": [
|
||||
{
|
||||
"id": "sauna-group",
|
||||
"labels": [
|
||||
"sauna_grouped"
|
||||
],
|
||||
"render": {
|
||||
"special": {
|
||||
"type": "group",
|
||||
"header": "sauna-header",
|
||||
"labels": "has_sauna;sauna_expanded;sauna-questions"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "sauna-header",
|
||||
"labels": [
|
||||
"sauna_grouped",
|
||||
"hidden"
|
||||
],
|
||||
"render": {
|
||||
"en": "Sauna information"
|
||||
},
|
||||
"icon": "./assets/layers/sauna/sauna.svg",
|
||||
"mappings": [
|
||||
{
|
||||
"if": "sauna=no",
|
||||
"then": {
|
||||
"en": "No sauna"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "sauna-picture-carousel",
|
||||
"labels": [
|
||||
"sauna_expanded",
|
||||
"sauna_grouped",
|
||||
"hidden"
|
||||
],
|
||||
"render": {
|
||||
"special": {
|
||||
"type": "image_carousel",
|
||||
"image_key": "sayna:panoramax;sauna:image;sauna:mapillary"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "sauna-picture",
|
||||
"condition": {
|
||||
"and": [
|
||||
{
|
||||
"or": [
|
||||
"sauna=yes",
|
||||
"leisure=sauna",
|
||||
"beauty=sauna"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"labels": [
|
||||
"sauna_expanded",
|
||||
"sauna_grouped",
|
||||
"hidden"
|
||||
],
|
||||
"render": {
|
||||
"special": {
|
||||
"type": "image_upload",
|
||||
"image_key": "sauna:panoramax",
|
||||
"label": {
|
||||
"en": "Add a picture of the sauna"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"question": {
|
||||
"en": "Does {title()} have a sauna?"
|
||||
},
|
||||
"id": "has_sauna",
|
||||
"labels": [
|
||||
"sauna_grouped",
|
||||
"at_leisure_only",
|
||||
"hidden"
|
||||
],
|
||||
"mappings": [
|
||||
{
|
||||
"if": "sauna=yes",
|
||||
"then": {
|
||||
"en": "Has a sauna"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": "sauna=no",
|
||||
"then": {
|
||||
"en": "No sauna"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "sauna_access",
|
||||
"labels": [
|
||||
"sauna_expanded",
|
||||
"sauna_grouped",
|
||||
"hidden"
|
||||
],
|
||||
"condition": {
|
||||
"and": [
|
||||
{
|
||||
"or": [
|
||||
"sauna=yes"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"question": {
|
||||
"en": "Is this sauna publicly accessible?",
|
||||
"de": "Ist die Sauna öffentlich zugänglich?"
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
"if": "sauna: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úblico",
|
||||
"da": "Offentlig adgang",
|
||||
"ca": "Accés públic",
|
||||
"cs": "Veřejný přístup",
|
||||
"sl": "Javno dostopno"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": "sauna:access=customers",
|
||||
"then": {
|
||||
"en": "Only access to customers of the amenity",
|
||||
"de": "Nur Zugang für Kunden der Einrichtung",
|
||||
"nl": "Enkel toegankelijk voor klanten van de voorziening",
|
||||
"fr": "Accessibles uniquement au clients du lieu",
|
||||
"ca": "Només accessible a clients de l'instal·lació",
|
||||
"cs": "Přístup pouze zákazníkům zařízení občanské vybavenosti",
|
||||
"sl": "Samo za stranke lokala",
|
||||
"es": "Solo acceso para clientes del servicio"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": "sauna:access=no",
|
||||
"then": {
|
||||
"en": "Not accessible, even for customers of the amenity",
|
||||
"de": "Nicht zugänglich, auch nicht für Kunden der Einrichtung",
|
||||
"nl": "Niet toegankelijk, ook niet voor klanten van de voorziening",
|
||||
"fr": "Non accessibles, même pour les clients du lieu",
|
||||
"ca": "No accessible, inclús per als clients de la instal·lació",
|
||||
"cs": "Není přístupný, a to ani pro zákazníky občanské vybavenosti",
|
||||
"sl": "Ni dostopno niti za stranke lokala",
|
||||
"es": "Inaccesible, incluso para clientes del servicio"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": "sauna:access=public",
|
||||
"then": {
|
||||
"en": "Public access",
|
||||
"de": "Öffentlicher Zugang",
|
||||
"fr": "Accès publique",
|
||||
"nl": "Publiek toegankelijk",
|
||||
"it": "Accesso pubblico",
|
||||
"ru": "Свободный доступ",
|
||||
"es": "Acceso público",
|
||||
"da": "Offentlig adgang",
|
||||
"ca": "Accés públic",
|
||||
"cs": "Veřejný přístup"
|
||||
},
|
||||
"hideInAnswer": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "charge_cost_rewritten",
|
||||
"rewrite": {
|
||||
"sourceString": [
|
||||
"{key}",
|
||||
"{time}"
|
||||
],
|
||||
"into": [
|
||||
[
|
||||
"2 hours",
|
||||
{
|
||||
"en": "2 hours",
|
||||
"de": "2 Stunden"
|
||||
}
|
||||
],
|
||||
[
|
||||
"4 hours",
|
||||
{
|
||||
"en": "4 hours",
|
||||
"de": "4 Stunden"
|
||||
}
|
||||
],
|
||||
[
|
||||
"day",
|
||||
{
|
||||
"en": "one day",
|
||||
"de": "einen Tag"
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"renderings": [
|
||||
{
|
||||
"id": "charge_{key}",
|
||||
"labels": [
|
||||
"sauna_expanded",
|
||||
"sauna_grouped",
|
||||
"hidden"
|
||||
],
|
||||
"question": {
|
||||
"en": "What is the entrance fee for {time}?",
|
||||
"de": "Was ist der Eintrittspreis für {time}?"
|
||||
},
|
||||
"render": {
|
||||
"en": "entrance fee for {time}: {charge}",
|
||||
"de": "Eintrittspreis für {time}: {charge}"
|
||||
},
|
||||
"freeform": {
|
||||
"key": "charge",
|
||||
"type": "currency",
|
||||
"inline": true,
|
||||
"postfixDistinguished": "{key}",
|
||||
"addExtraTags": [
|
||||
"fee=yes"
|
||||
]
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
"if": "fee=no",
|
||||
"addExtraTags": [
|
||||
"charge="
|
||||
],
|
||||
"then": {
|
||||
"en": "The sauna is free of charge",
|
||||
"de": "Die Sauna ist kostenlos"
|
||||
}
|
||||
}
|
||||
],
|
||||
"condition": {
|
||||
"and": [
|
||||
"access!=customers",
|
||||
"access!=no",
|
||||
"access!=private",
|
||||
{
|
||||
"or": [
|
||||
"sauna=yes"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "sauna-questions",
|
||||
"labels": [
|
||||
"sauna_grouped",
|
||||
"hidden"
|
||||
],
|
||||
"render": {
|
||||
"special": {
|
||||
"type": "questions",
|
||||
"labels": "at_leisure_only;sauna_expanded"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"allowMove": true,
|
||||
"credits": "Osmwithspace",
|
||||
"credits:uid": 8770388
|
||||
}
|
|
@ -365,6 +365,69 @@
|
|||
"filter": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "beauty_shop_type",
|
||||
"question": {
|
||||
"en": "What type of beauty shop is this?"
|
||||
},
|
||||
"multiAnswer": true,
|
||||
"mappings": [
|
||||
{
|
||||
"if": "beauty=nails",
|
||||
"then": {
|
||||
"en": "Offers nail care services such as manicures, pedicures, and nail enhancements"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": "beauty=skin_care",
|
||||
"then": {
|
||||
"en": "Offers skin care services"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": "beauty=tanning",
|
||||
"then": {
|
||||
"en": "Offers tanning services such as sunbeds"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": "beauty=cosmetics",
|
||||
"then": {
|
||||
"en": "Offers cosmetic services, such as makeup"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": "beauty=massage",
|
||||
"then": {
|
||||
"en": "Offers massages"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": "beauty=waxing",
|
||||
"then": {
|
||||
"en": "Offers hair removal through waxing"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": "beauty=hair_removal",
|
||||
"then": {
|
||||
"en": "Offers hair removal services, e.g. with a laser"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": "beauty=eyebrow",
|
||||
"then": {
|
||||
"en": "Offers eyebrow enhancement services"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": "beauty=pedicure",
|
||||
"then": {
|
||||
"en": "Offers pedicure services"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "brand",
|
||||
"question": {
|
||||
|
@ -1357,9 +1420,7 @@
|
|||
{
|
||||
"builtin": "bike_cleaning.bike_cleaning-service_bicycle_cleaning_charge"
|
||||
},
|
||||
"internet",
|
||||
"internet-fee",
|
||||
"internet-ssid",
|
||||
"internet-all",
|
||||
{
|
||||
"id": "organic",
|
||||
"question": {
|
||||
|
@ -1471,6 +1532,21 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"builtin": "sauna_at_leisure.sauna_grouped",
|
||||
"override": {
|
||||
"condition": {
|
||||
"and+": [
|
||||
{
|
||||
"or": [
|
||||
"shop=beauty",
|
||||
"shop=massage"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"description",
|
||||
"toilet_at_amenity_lib.all"
|
||||
],
|
||||
|
|
|
@ -1446,7 +1446,8 @@
|
|||
"it": "Quali sport si praticano in questa struttura?",
|
||||
"cs": "Jaké sporty se provozují na tomto sportovišti?"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sauna_at_leisure.sauna_grouped"
|
||||
],
|
||||
"filter": [
|
||||
"open_now"
|
||||
|
|
|
@ -408,6 +408,7 @@
|
|||
"contact",
|
||||
"wheelchair-access",
|
||||
"toilet_at_amenity_lib.all",
|
||||
"sauna_at_leisure.sauna_grouped",
|
||||
"internet-all",
|
||||
"dog-access"
|
||||
],
|
||||
|
|
135
assets/themes/sauna/sauna.json
Normal file
135
assets/themes/sauna/sauna.json
Normal file
|
@ -0,0 +1,135 @@
|
|||
{
|
||||
"id": "sauna",
|
||||
"title": {
|
||||
"en": "Sauna"
|
||||
},
|
||||
"description": {
|
||||
"en": "Sauna"
|
||||
},
|
||||
"icon": "./assets/layers/sauna/sauna.svg",
|
||||
"credits": [
|
||||
"Osmwithspace"
|
||||
],
|
||||
"#layers": "sauna_at_leisure acts as fallback-layer and will show all objects with `sauna=yes`",
|
||||
"layers": [
|
||||
"sauna",
|
||||
{
|
||||
"builtin": "tourism_accomodation",
|
||||
"override": {
|
||||
"id": "tourism_accomodation_with_sauna",
|
||||
"presets=": [],
|
||||
"filter=": [],
|
||||
"minzoom": 8,
|
||||
"source": {
|
||||
"osmTags": {
|
||||
"and+": "sauna=yes"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"builtin": "tourism_accomodation",
|
||||
"override": {
|
||||
"minzoom": 18,
|
||||
"name=": null,
|
||||
"filter": {
|
||||
"sameAs": "tourism_accomodation_with_sauna"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"builtin": "sports_centre",
|
||||
"override": {
|
||||
"minzoom": 8,
|
||||
"id": "sports_centre_with_sauna",
|
||||
"presets=": [],
|
||||
"filter=":[],
|
||||
"source": {
|
||||
"osmTags": {
|
||||
"and+": [
|
||||
"sauna=yes"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"builtin": "sports_centre",
|
||||
"override": {
|
||||
"name": null,
|
||||
"minzoom": 18,
|
||||
"filter": {
|
||||
"sameAs": "sports_centre_with_sauna"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"builtin": "shops",
|
||||
"override": {
|
||||
"id": "shops_with_sauna",
|
||||
"source": {
|
||||
"osmTags":
|
||||
{
|
||||
"and+": [
|
||||
"sauna=yes"
|
||||
]
|
||||
}
|
||||
|
||||
},
|
||||
"presets=":[],
|
||||
"minzoom": 8,
|
||||
"filter=": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"builtin": "shops",
|
||||
"hideTagRenderingsWithLabels": [
|
||||
"shop_types"
|
||||
],
|
||||
"override": {
|
||||
"id": "beauty_shops",
|
||||
"minzoom": 18,
|
||||
"name=": null,
|
||||
"source": {
|
||||
"osmTags": {
|
||||
"and+": [
|
||||
{
|
||||
"or": [
|
||||
"shop=beauty",
|
||||
"shop=massage"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"presets=": [
|
||||
{
|
||||
"tags": [
|
||||
"shop=beauty"
|
||||
],
|
||||
"title": {
|
||||
"en": "a beauty shop"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tags": [
|
||||
"shop=massage"
|
||||
],
|
||||
"title": {
|
||||
"en": "a massage shop"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"builtin": "toilet",
|
||||
"override": {
|
||||
"minzoom":18,
|
||||
"name=": null
|
||||
}
|
||||
},
|
||||
"sauna_at_leisure"
|
||||
],
|
||||
"credits:uid": 8770388
|
||||
}
|
|
@ -6,6 +6,7 @@ import {
|
|||
MappingConfigJson,
|
||||
QuestionableTagRenderingConfigJson,
|
||||
} from "../Json/QuestionableTagRenderingConfigJson"
|
||||
import { Utils } from "../../../Utils"
|
||||
|
||||
export default class AddPrefixToTagRenderingConfig extends DesugaringStep<QuestionableTagRenderingConfigJson> {
|
||||
private readonly _prefix: string
|
||||
|
@ -18,6 +19,40 @@ export default class AddPrefixToTagRenderingConfig extends DesugaringStep<Questi
|
|||
this._prefix = prefix
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* new AddPrefixToTagRenderingConfig("PREFIX").rewriteArguments("Some argument with a {key}") // => "Some argument with a {PREFIX:key}"
|
||||
*
|
||||
* // Don't rewrite metatags
|
||||
* new AddPrefixToTagRenderingConfig("PREFIX").rewriteArguments("Some argument with a {_calculated_key}") // => "Some argument with a {_calculated_key}"
|
||||
*
|
||||
|
||||
*/
|
||||
private rewriteArguments(txt: string) {
|
||||
const regex = /(.*?){([^}]*)}(.*)/s
|
||||
let match = txt.match(regex)
|
||||
if (!match) {
|
||||
return txt
|
||||
}
|
||||
let result = ""
|
||||
while (match) {
|
||||
const [_, normal, key, leftover] = match
|
||||
if (key.startsWith("_")) {
|
||||
result += normal + "{" + key + "}"
|
||||
} else {
|
||||
result += normal + "{" + this._prefix + ":" + key + "}"
|
||||
}
|
||||
match = leftover.match(regex)
|
||||
if (!match) {
|
||||
result += leftover
|
||||
}
|
||||
}
|
||||
if(txt !== result){
|
||||
console.log(">>> Rewritten", txt, "into", result)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* const edit = new AddPrefixToTagRenderingConfig("PREFIX")
|
||||
|
@ -29,6 +64,9 @@ export default class AddPrefixToTagRenderingConfig extends DesugaringStep<Questi
|
|||
*
|
||||
* // Should prefix the default key in a special visualisation
|
||||
* new AddPrefixToTagRenderingConfig("PREFIX").updateString("{opening_hours_table()}") // => "{opening_hours_table(PREFIX:opening_hours,,)}"
|
||||
*
|
||||
* // Should prefix links, e.g. for 'phone'
|
||||
* new AddPrefixToTagRenderingConfig("PREFIX").updateString("{link({phone},tel:{phone},,,,)}") // => "{link({PREFIX:phone},tel:{PREFIX:phone},,,,)}"
|
||||
*/
|
||||
private updateString(str: string): string {
|
||||
const parsed = SpecialVisualizations.constructSpecification(str)
|
||||
|
@ -45,7 +83,7 @@ export default class AddPrefixToTagRenderingConfig extends DesugaringStep<Questi
|
|||
if (argDoc.type === "key") {
|
||||
newArgs.push(this._prefix + ":" + (argV ?? argDoc.defaultValue ?? ""))
|
||||
} else {
|
||||
newArgs.push(argV ?? "")
|
||||
newArgs.push(this.rewriteArguments(argV ?? ""))
|
||||
}
|
||||
}
|
||||
fixedSpec.push("{" + spec.func.funcName + "(" + newArgs.join(",") + ")}")
|
||||
|
|
|
@ -1072,7 +1072,7 @@ class DeriveSource extends DesugaringStep<LayerConfigJson> {
|
|||
return json
|
||||
}
|
||||
|
||||
json.source = { osmTags }
|
||||
json.source = { osmTags: {and: [osmTags]} }
|
||||
return json
|
||||
}
|
||||
}
|
||||
|
|
|
@ -506,7 +506,11 @@ class WarnForUnsubstitutedLayersInTheme extends DesugaringStep<ThemeConfigJson>
|
|||
if (layer["builtin"] !== undefined) {
|
||||
continue
|
||||
}
|
||||
if (layer["source"]["geojson"] !== undefined) {
|
||||
if(layer["override"]!==undefined){
|
||||
context.err("Got an `override` block without a `builtin`-specification")
|
||||
continue
|
||||
}
|
||||
if (layer["source"]?.["geojson"] !== undefined) {
|
||||
// We turn a blind eye for import layers
|
||||
continue
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ export default class LayerConfig extends WithContextLoader {
|
|||
* If this layer is based on another layer, this might be indicated here
|
||||
* @private
|
||||
*/
|
||||
private readonly _basedOn: string | undefined
|
||||
public readonly _basedOn: string | undefined
|
||||
|
||||
constructor(
|
||||
json: LayerConfigJson,
|
||||
|
|
|
@ -248,6 +248,10 @@ class PresetTypeSelect extends SpecialVisualizationSvelte {
|
|||
layer: LayerConfig,
|
||||
): SvelteUIElement {
|
||||
const t = Translations.t.preset_type
|
||||
if(layer._basedOn !== layer.id){
|
||||
console.warn("Trying to use the _original_ layer")
|
||||
layer = state.theme.layers.find(l => l.id === layer._basedOn) ?? layer
|
||||
}
|
||||
const question: QuestionableTagRenderingConfigJson = {
|
||||
id: layer.id + "-type",
|
||||
question: t.question.translations,
|
||||
|
@ -260,6 +264,10 @@ class PresetTypeSelect extends SpecialVisualizationSvelte {
|
|||
}).translations,
|
||||
})),
|
||||
}
|
||||
if(question.mappings.length === 0){
|
||||
console.error("No mappings for preset_type_select, something went wrong")
|
||||
return undefined
|
||||
}
|
||||
const config = new TagRenderingConfig(question)
|
||||
return new SvelteUIElement(TagRenderingEditable, {
|
||||
config,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue