can display calculated tags with tag renderings

This commit is contained in:
Andrews Leruth 2022-07-13 14:33:53 +02:00
parent 99fabe6e5c
commit c2328e784a
2 changed files with 28 additions and 3 deletions

View file

@ -45,6 +45,30 @@
}
],
"calculatedTags": [
"_entrance=feat.overlapWith('entrance')?.map(e => e.feat.properties.id)"
"_entrance_properties=feat.overlapWith('entrance')?.map(e => e.feat.properties).filter(p => p !== undefined)",
"_entrance:id=feat.get('_entrance_properties')?.map(e => e.id)",
"_entrance:width=feat.get('_entrance_properties')?.map(e => e.width)?.at(0)"
],
"tagRenderings": [
{
"id": "Entrance_width",
"render": {
"en": "This door has a width of {canonical(_entrance:width)} meter",
"nl": "Deze deur heeft een breedte van {canonical(_entrance:width)} meter",
"de": "Diese Tür hat eine Durchgangsbreite von {canonical(_entrance:width)} Meter",
"es": "Esta puerta tiene una ancho de {canonical(_entrance:width)} metros"
},
"freeform": {
"key": "_entrance:width"
},
"mappings": [
{
"if": "_entrance:width=",
"then": {
"en": "This entrance has no width information"
}
}
]
}
]
}

View file

@ -4,7 +4,7 @@
"en": "OnWheels"
},
"description": {
"en": "On this map, publicly weelchair accessible places are shown and can be easily added"
"en": "On this map, publicly wheelchair accessible places are shown and can be easily added"
},
"maintainer": "MapComplete",
"icon": "./assets/themes/onwheels/crest.svg",
@ -27,7 +27,8 @@
"shops",
"toilet",
"viewpoint",
"doctors"
"doctors",
"walls_and_buildings"
],
"overrideAll" : {
"minzoom" : "15",