198 lines
5.6 KiB
JSON
198 lines
5.6 KiB
JSON
{
|
|
"id": "icons",
|
|
"description": {
|
|
"en": "A layer acting as library for icon-tagrenderings, especially to show as badge next to a POI",
|
|
"de": "Eine Ebene, die als Bibliothek für Symbol-Tag-Renderings dient, insbesondere um als Abzeichen neben einem POI angezeigt zu werden",
|
|
"ca": "Una capa que actua com a biblioteca per a les icones d'etiquetes, especialment per mostrar-se com a insígnia al costat d'un PDI"
|
|
},
|
|
"source": "special:library",
|
|
"title": null,
|
|
"tagRenderings": [
|
|
{
|
|
"id": "wikipedialink",
|
|
"labels": [
|
|
"defaults"
|
|
],
|
|
"render": "<a href='https://wikipedia.org/wiki/{wikipedia}' target='_blank' rel='noopener'><img src='./assets/svg/wikipedia.svg' textmode='📖' alt='Wikipedia'/></a>",
|
|
"condition": {
|
|
"or": [
|
|
"wikipedia~*",
|
|
"wikidata~*"
|
|
]
|
|
},
|
|
"mappings": [
|
|
{
|
|
"#": "ignore-image-in-then",
|
|
"if": "wikipedia=",
|
|
"then": "<a href='https://www.wikidata.org/wiki/{wikidata}' target='_blank' rel='noopener'><img src='./assets/svg/wikidata.svg' alt='WD'/></a>"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "isOpen",
|
|
"#": "Shows a coloured clock if opening hours are parsed. Uses the metatagging, suitable to use as a (badged) overlay",
|
|
"mappings": [
|
|
{
|
|
"if": "_isOpen=yes",
|
|
"then": "clock:#0f0;ring:#0f0"
|
|
},
|
|
{
|
|
"if": "_isOpen=no",
|
|
"then": "circle:#f00;clock:#fff"
|
|
},
|
|
{
|
|
"#": "Still loading the country",
|
|
"if": {
|
|
"and": [
|
|
"_isOpen=",
|
|
"opening_hours~*"
|
|
]
|
|
},
|
|
"then": "clock:#ff0;ring:#ff0"
|
|
},
|
|
{
|
|
"#": "Still loading the country",
|
|
"if": {
|
|
"and": [
|
|
"_isOpen=parse_error",
|
|
"opening_hours~*"
|
|
]
|
|
},
|
|
"then": "circle:#f0f;clock:#fff"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "phonelink",
|
|
"labels": [
|
|
"defaults"
|
|
],
|
|
"render": "<a href='tel:{phone}'><img textmode='📞' alt='phone' src='./assets/layers/questions/phone.svg'/></a>",
|
|
"mappings": [
|
|
{
|
|
"#": "ignore-image-in-then",
|
|
"if": "contact:phone~*",
|
|
"then": "<a href='tel:{contact:phone}'><img textmode='📞' alt='phone' src='./assets/layers/questions/phone.svg'/></a>"
|
|
}
|
|
],
|
|
"condition": {
|
|
"or": [
|
|
"phone~*",
|
|
"contact:phone~*"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": "emaillink",
|
|
"labels": [
|
|
"defaults"
|
|
],
|
|
"render": "<a href='mailto:{email}'><img textmode='✉️' alt='email' src='./assets/layers/questions/send_email.svg'/></a>",
|
|
"mappings": [
|
|
{
|
|
"#": "ignore-image-in-then",
|
|
"if": "contact:email~*",
|
|
"then": "<a href='mailto:{contact:email}'><img textmode='✉️' alt='email' src='./assets/layers/questions/send_email.svg'/></a>"
|
|
}
|
|
],
|
|
"condition": {
|
|
"or": [
|
|
"email~*",
|
|
"contact:email~*"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": "websitelink",
|
|
"labels": [
|
|
"defaults"
|
|
],
|
|
"render": "<a href='{website}' target='_blank' rel='noopener'><img textmode='🌐' alt='website' src='./assets/layers/icons/website.svg'/></a>",
|
|
"condition": "website~*"
|
|
},
|
|
{
|
|
"id": "smokingicon",
|
|
"labels": [
|
|
"defaults"
|
|
],
|
|
"mappings": [
|
|
{
|
|
"#": "ignore-image-in-then",
|
|
"if": "smoking=no",
|
|
"then": "<img textmode='🚭️' alt='no-smoking' src='./assets/layers/questions/no_smoking.svg'/>"
|
|
},
|
|
{
|
|
"#": "ignore-image-in-then",
|
|
"if": "smoking=yes",
|
|
"then": "<img textmode='🚬️' alt='smoking-allowed' src='./assets/layers/questions/smoking.svg'/>"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "sharelink",
|
|
"labels": [
|
|
"defaults"
|
|
],
|
|
"render": "{share_link()}",
|
|
"metacondition": "_supports_sharing=yes"
|
|
},
|
|
{
|
|
"id": "osmlink",
|
|
"labels": [
|
|
"defaults"
|
|
],
|
|
"render": "<a href='https://openstreetmap.org/{id}' target='_blank' rel='noopener'><img alt='on osm' textmode='🗺️' src='./assets/svg/osm-logo-us.svg'/></a>",
|
|
"mappings": [
|
|
{
|
|
"if": "id~.*/-.*",
|
|
"then": ""
|
|
},
|
|
{
|
|
"#": "ignore-image-in-then",
|
|
"if": "_backend~*",
|
|
"then": "<a href='{_backend}/{id}' target='_blank' rel='noopener'><img src='./assets/svg/osm-logo-us.svg'/></a>"
|
|
}
|
|
],
|
|
"condition": "id~(node|way|relation)/[0-9]*"
|
|
},
|
|
{
|
|
"id": "dogicon",
|
|
"labels": [
|
|
"defaults"
|
|
],
|
|
"mappings": [
|
|
{
|
|
"if": "dog=no",
|
|
"#": "ignore-image-in-then",
|
|
"then": "<img textmode='🐕 ⃠' alt='no_dogs' src='./assets/layers/questions/no_dogs.svg'>"
|
|
},
|
|
{
|
|
"if": "dog=leashed",
|
|
"#": "ignore-image-in-then",
|
|
"then": "<img textmode='🐕' alt='dogs are allowed but leashed' src='./assets/layers/questions/dogs_leashed.svg'>"
|
|
},
|
|
{
|
|
"if": {
|
|
"or": [
|
|
"dog=yes",
|
|
"dog=unleashed"
|
|
]
|
|
},
|
|
"#": "ignore-image-in-then",
|
|
"then": "<img textmode='🐕' alt='dogs are allowed' src='./assets/layers/questions/dogs_allowed.svg'>"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "rating",
|
|
"labels": [
|
|
"defaults"
|
|
],
|
|
"icon": {
|
|
"class": "w-20 mx-1 flex items-center"
|
|
},
|
|
"render": "{rating()}"
|
|
}
|
|
],
|
|
"mapRendering": null
|
|
}
|