forked from MapComplete/MapComplete
WIP
This commit is contained in:
parent
32e0c18b09
commit
181c5583d2
5 changed files with 51 additions and 19 deletions
|
@ -366,8 +366,10 @@
|
|||
],
|
||||
"overrideAll": {
|
||||
"+calculatedTags": [
|
||||
"_poi_walls_and_buildings_entrance_properties=feat.closestn('walls_and_buildings', 1, undefined, 1000).map(w => ({id: w.feat.properties.id, width: w.feat.properties['_entrance:width']}))[0]",
|
||||
"_poi_entrance:id=JSON.parce(feat.properties._poi_walls_and_buildings_entrance_properteis)?.id",
|
||||
"_poi_walls_and_buildings_entrance_properties=[].concat(...feat.closestn('walls_and_buildings',1, undefined, 500).map(w => ({id: w.feat.properties.id, width: w.feat.properties['_entrance_properties']})))",
|
||||
"_poi_walls_and_buildings_entrance_count=[].concat(...feat.overlapWith('walls_and_buildings').map(w => ({id: w.feat.properties.id, width: w.feat.properties['_entrance_properties']})))",
|
||||
"_poi_walls_and_buildings_entrance_properties_with_width=feat.get('_poi_walls_and_buildings_entrance_properties').filter(p => p['width'] !== undefined)",
|
||||
"_poi_entrance:id=JSON.parse(feat.properties._poi_walls_and_buildings_entrance_properteis)?.id",
|
||||
"_poi_entrance:width=JSON.parse(feat.properties._poi_walls_and_buildings_entrance_properties)?.width"
|
||||
],
|
||||
"+tagRenderings": [
|
||||
|
@ -381,25 +383,23 @@
|
|||
"door="
|
||||
]
|
||||
},
|
||||
"mappings": [{
|
||||
"if": "_poi_walls_and_buildings_entrance_properties_with_width=[]",
|
||||
"then": {
|
||||
"en": "The containing building has {}"
|
||||
}
|
||||
}],
|
||||
"render": {
|
||||
"en": "The containing building can be entered via <a href='#{_poi_entrance:id}'>a door of {canonical(_poi_entrance:width)}</a>",
|
||||
"fr": "On peut entrer dans ce batiment via <a href='#{_poi_entrance:id}'>une porte de {canonical(_poi_entrance:width)}</a>",
|
||||
"de": "Das Gebäude kann über <a href='#{_poi_entrance:id}'>durch eine Tür von {canonical(_poi_entrance:width)} betreten werden.</a>"
|
||||
},
|
||||
"freeform": {
|
||||
"key": "_poi_entrance:width",
|
||||
"type": "distance"
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
"if": "_poi_entrance:width=",
|
||||
"then": {
|
||||
"en": "The containing building has no information on door widths. Add a door and measure the width to get information",
|
||||
"fr": "Ce bâtiment n'a aucune information sur les largeurs de portes. Ajoutez une porte et mesurez la largeur pour obtenir des informations",
|
||||
"de": "Das Gebäude hat keine Informationen über Türbreiten. Fügen Sie eine Tür hinzu und messen Sie die Breite, um Informationen zu erhalten"
|
||||
"special": {
|
||||
"type": "multi",
|
||||
"key": "_poi_walls_and_buildings_entrance_properties",
|
||||
"tagrendering": {
|
||||
"en": "The containing building can be entered via <a href='#{_poi_entrance:id}'>a door of {canonical(_poi_entrance:width)}</a>",
|
||||
"fr": "On peut entrer dans ce batiment via <a href='#{_poi_entrance:id}'>une porte de {canonical(_poi_entrance:width)}</a>",
|
||||
"de": "Das Gebäude kann über <a href='#{_poi_entrance:id}'>durch eine Tür von {canonical(_poi_entrance:width)} betreten werden.</a>"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue