forked from MapComplete/MapComplete
Themes(onwheels): move building magic back to onwheels theme, decrease minzoom for entrances
This commit is contained in:
parent
aaf46cd7b0
commit
98e8adf41b
2 changed files with 95 additions and 97 deletions
assets
|
@ -21,15 +21,6 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"calculatedTags": [
|
||||
"_entrance_properties=overlapWith(feat)('entrance')?.map(e => e.feat.properties)?.filter(p => p !== undefined && p.indoor !== 'door')",
|
||||
"_entrance_properties_with_width=get(feat)('_entrance_properties')?.filter(p => p['width'] !== undefined)",
|
||||
"_entrances_count=get(feat)('_entrance_properties').length",
|
||||
"_entrances_count_without_width_count= get(feat)('_entrances_count') - get(feat)('_entrance_properties_with_width').length",
|
||||
"_biggest_width= Math.max( get(feat)('_entrance_properties').map(p => p.width))",
|
||||
"_biggest_width_properties= /* Can be a list! */ get(feat)('_entrance_properties').filter(p => p.width === get(feat)('_biggest_width'))",
|
||||
"_biggest_width_id=get(feat)('_biggest_width_properties').id"
|
||||
],
|
||||
"isCounted": false,
|
||||
"minzoom": 18,
|
||||
"shownByDefault": false,
|
||||
|
@ -59,94 +50,7 @@
|
|||
}
|
||||
],
|
||||
"passAllFeatures": true,
|
||||
"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:",
|
||||
"nl": "<h3>Ingangen</h3>Dit gebouw heeft {_entrances_count} ingangen:",
|
||||
"ca": "<h3>Entrades</h3>Aquest edifici té {_entrances_count} entrades:",
|
||||
"cs": "<h3>Vchody</h3>Tato budova má {_entrances_count} vchodů:",
|
||||
"es": "<h3>Entradas</h3>Este edificio tiene {_entrances_count} entradas:"
|
||||
},
|
||||
"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",
|
||||
"nl": "{_entrances_count_without_width_count} ingangen hebben nog geen informatie over de breedte",
|
||||
"ca": "{_entrances_count_without_width_count} entrades encara no tenen informació d'amplada",
|
||||
"cs": "{_entrances_count_without_width_count} vchody zatím nemají informace o šířce",
|
||||
"es": "{_entrances_count_without_width_count} entradas aún no tienen información de ancho"
|
||||
},
|
||||
"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)}",
|
||||
"nl": "Een <a href='#{id}'>ingang</a> van {canonical(width)}",
|
||||
"ca": "Una <a href='#{id}'>entrada </a> de {canonical(width)}",
|
||||
"cs": "<a href='#{id}'>vchod</a> {canonical(width)}",
|
||||
"es": "Una <a href='#{id}'>entrada</a> de {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",
|
||||
"nl": "Geen ingang is gemarkeerd",
|
||||
"ca": "No s'ha senyalitzat cap entrada",
|
||||
"cs": "Nebyl označen žádný vchod",
|
||||
"es": "No se ha marcado ninguna entrada"
|
||||
}
|
||||
},
|
||||
{
|
||||
"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",
|
||||
"nl": "Geen van de {_entrance_count} ingangen hebben al informatie over de breedte",
|
||||
"ca": "Cap de les {_entrance_count} entrades té informació d'amplada encara",
|
||||
"cs": "Žádný z {_entrance_count} vchodů zatím nemá informace o šířce",
|
||||
"es": "Ninguna de las {_entrance_count} entradas tiene información de ancho todavía"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"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~*"
|
||||
}
|
||||
],
|
||||
"allowMove": false,
|
||||
"units": [
|
||||
{
|
||||
"width": {
|
||||
"quantity": "distance",
|
||||
"denominations": [
|
||||
"m",
|
||||
"cm"
|
||||
]
|
||||
},
|
||||
"_biggest_width": {
|
||||
"quantity": "distance",
|
||||
"denominations": [
|
||||
"m",
|
||||
"cm"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"snapName": {
|
||||
"en": "a wall or building",
|
||||
"nl": "een muur of gebouw",
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
{
|
||||
"builtin": "entrance",
|
||||
"override": {
|
||||
"minzoom": 18,
|
||||
"minzoom": 16,
|
||||
"pointRendering": [
|
||||
{
|
||||
"=marker": [
|
||||
|
@ -413,7 +413,101 @@
|
|||
"builtin": "walls_and_buildings",
|
||||
"override": {
|
||||
"calculatedTags+": [
|
||||
"_entrance_properties=overlapWith(feat)('entrance')?.map(e => e.feat.properties)?.filter(p => p !== undefined && p.indoor !== 'door')",
|
||||
"_entrance_properties_with_width=get(feat)('_entrance_properties')?.filter(p => p['width'] !== undefined)",
|
||||
"_entrances_count=get(feat)('_entrance_properties').length",
|
||||
"_entrances_count_without_width_count= get(feat)('_entrances_count') - get(feat)('_entrance_properties_with_width').length",
|
||||
"_biggest_width= Math.max( get(feat)('_entrance_properties').map(p => p.width))",
|
||||
"_biggest_width_properties= /* Can be a list! */ get(feat)('_entrance_properties').filter(p => p.width === get(feat)('_biggest_width'))",
|
||||
"_biggest_width_id=get(feat)('_biggest_width_properties').id",
|
||||
"_entrance_data_within=overlapWith(feat)('onwheels_entrance_data').map(f => f.properties.id)"
|
||||
],
|
||||
"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:",
|
||||
"nl": "<h3>Ingangen</h3>Dit gebouw heeft {_entrances_count} ingangen:",
|
||||
"ca": "<h3>Entrades</h3>Aquest edifici té {_entrances_count} entrades:",
|
||||
"cs": "<h3>Vchody</h3>Tato budova má {_entrances_count} vchodů:",
|
||||
"es": "<h3>Entradas</h3>Este edificio tiene {_entrances_count} entradas:"
|
||||
},
|
||||
"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",
|
||||
"nl": "{_entrances_count_without_width_count} ingangen hebben nog geen informatie over de breedte",
|
||||
"ca": "{_entrances_count_without_width_count} entrades encara no tenen informació d'amplada",
|
||||
"cs": "{_entrances_count_without_width_count} vchody zatím nemají informace o šířce",
|
||||
"es": "{_entrances_count_without_width_count} entradas aún no tienen información de ancho"
|
||||
},
|
||||
"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)}",
|
||||
"nl": "Een <a href='#{id}'>ingang</a> van {canonical(width)}",
|
||||
"ca": "Una <a href='#{id}'>entrada </a> de {canonical(width)}",
|
||||
"cs": "<a href='#{id}'>vchod</a> {canonical(width)}",
|
||||
"es": "Una <a href='#{id}'>entrada</a> de {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",
|
||||
"nl": "Geen ingang is gemarkeerd",
|
||||
"ca": "No s'ha senyalitzat cap entrada",
|
||||
"cs": "Nebyl označen žádný vchod",
|
||||
"es": "No se ha marcado ninguna entrada"
|
||||
}
|
||||
},
|
||||
{
|
||||
"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",
|
||||
"nl": "Geen van de {_entrance_count} ingangen hebben al informatie over de breedte",
|
||||
"ca": "Cap de les {_entrance_count} entrades té informació d'amplada encara",
|
||||
"cs": "Žádný z {_entrance_count} vchodů zatím nemá informace o šířce",
|
||||
"es": "Ninguna de las {_entrance_count} entradas tiene información de ancho todavía"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"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~*"
|
||||
}
|
||||
],
|
||||
"units+": [
|
||||
{
|
||||
"width": {
|
||||
"quantity": "distance",
|
||||
"denominations": [
|
||||
"m",
|
||||
"cm"
|
||||
]
|
||||
},
|
||||
"_biggest_width": {
|
||||
"quantity": "distance",
|
||||
"denominations": [
|
||||
"m",
|
||||
"cm"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue