mapcomplete/assets/layers/walls_and_buildings/walls_and_buildings.json
2022-09-10 13:25:18 +02:00

145 lines
No EOL
5.4 KiB
JSON

{
"id": "walls_and_buildings",
"minzoom": 18,
"title": {
"render": {
"en": "Wall or building",
"nl": "Muur of gebouw",
"de": "Wand oder Gebäude",
"es": "Pared o edificio",
"fr": "Mur ou bâtiment",
"da": "Mur eller bygning"
}
},
"description": {
"en": "Special builtin layer providing all walls and buildings. This layer is useful in presets for objects which can be placed against walls (e.g. AEDs, postboxes, entrances, addresses, surveillance cameras, …). This layer is invisible by default and not toggleable by the user.",
"nl": "Speciale laag met alle muren en gebouwen. Deze laag is nuttig om objecten toe te voegen die met een muur verbonden zijn (zoals AEDs, brievenbussen, adressen, bewakingscamera's,…). Deze laag is standaard onzichtbaar en kan niet aangezet worden door de gebruiker.",
"de": "Spezielle Ebene, die alle Wände und Gebäude bereitstellt. Diese Ebene ist nützlich in Voreinstellungen für Objekte, die an Wänden platziert werden können (z. B. AEDs, Briefkästen, Eingänge, Adressen, Überwachungskameras, ...). Diese Ebene ist standardmäßig unsichtbar und kann vom Benutzer nicht umgeschaltet werden.",
"fr": "Couche intégrée spéciale fournissant tous les murs et bâtiments. Cette couche est utile dans les préréglages pour les objets qui peuvent être placés contre les murs (par exemple, les DEA, les boîtes aux lettres, les entrées, les adresses, les caméras de surveillance, …). Ce calque est invisible par défaut et non inchangeable par l'utilisateur."
},
"source": {
"osmTags": {
"or": [
"barrier=wall",
"building~*"
]
}
},
"passAllFeatures": true,
"shownByDefault": false,
"mapRendering": [
{
"color": {
"render": "#fff"
},
"fill": "no",
"width": {
"render": "3"
}
},
{
"color": {
"render": "#333"
},
"fill": "no",
"width": {
"render": "2"
}
}
],
"calculatedTags": [
"_entrance_properties=feat.overlapWith('entrance')?.map(e => e.feat.properties)?.filter(p => p !== undefined && p.indoor !== 'door')",
"_entrance_properties_with_width=feat.get('_entrance_properties')?.filter(p => p['width'] !== undefined)",
"_entrances_count=feat.get('_entrance_properties').length",
"_entrances_count_without_width_count= feat.get('_entrances_count') - feat.get('_entrance_properties_with_width').length",
"_biggest_width= Math.max( feat.get('_entrance_properties').map(p => p.width))",
"_biggest_width_properties= /* Can be a list! */ feat.get('_entrance_properties').filter(p => p.width === feat.get('_biggest_width'))",
"_biggest_width_id=feat.get('_biggest_width_properties').id"
],
"units": [
{
"appliesToKey": [
"width",
"_biggest_width"
],
"applicableUnits": [
{
"useIfNoUnitGiven": true,
"canonicalDenomination": "m",
"alternativeDenomination": [
"meter"
],
"human": {
"en": "meter",
"fr": "mètre",
"de": "Meter",
"da": "meter"
}
},
{
"useAsDefaultInput": true,
"canonicalDenomination": "cm",
"alternativeDenomination": [
"centimeter",
"cms"
],
"human": {
"en": "centimeter",
"fr": "centimètre",
"de": "Zentimeter",
"da": "centimeter"
}
}
]
}
],
"tagRenderings": [
{
"id": "entrance_info",
"render": {
"before": {
"en": "<h3>Entrances</h3>This building has {_entrances_count} entrances:",
"de": "<h3>Eingänge</h3>Das Gebäude hat {_entrances_count} Eingänge:",
"da": "<h3>Indgange</h3>Denne bygning har {_entrances_count} indgange:"
},
"after": {
"en": "{_entrances_count_without_width_count} entrances don't have width information yet",
"de": "{_entrances_count_without_width_count} Eingänge haben keine Angaben zur Breite",
"da": "{_entrances_count_without_width_count} indgange har endnu ikke oplysninger om bredde"
},
"special": {
"type": "multi",
"key": "_entrance_properties_with_width",
"tagrendering": {
"en": "An <a href='#{id}'>entrance</a> of {canonical(width)}",
"de": "Ein <a href='#{id}'>Eingang</a> von {canonical(width)}",
"da": "En <a href='#{id}'>indgang</a> på {canonical(width)}"
}
}
},
"mappings": [
{
"if": "_entrances_count=0",
"then": {
"en": "No entrance has been marked",
"de": "Es wurde kein Eingang markiert",
"da": "Der er ikke markeret nogen indgang"
}
},
{
"if": "_entrances_count_without_width:=_entrances_count",
"then": {
"en": "None of the {_entrance_count} entrances have width information yet",
"de": "Keiner der {_entrance_count} Eingänge hat bisher Angaben zur Breite",
"da": "Ingen af {_entrance_count}-indgangene har oplysninger om bredde endnu"
}
}
]
},
{
"id": "biggest_width",
"render": "The <a href='#{_biggest_width_id}'>entrance with the biggest width</a> is {canonical(_biggest_width)} wide",
"condition": "_biggest_width_id~*"
}
]
}