diff --git a/assets/layers/entrance/entrance.json b/assets/layers/entrance/entrance.json index c5df0bb8d..8683d4106 100644 --- a/assets/layers/entrance/entrance.json +++ b/assets/layers/entrance/entrance.json @@ -340,6 +340,34 @@ "key": "width", "type": "distance" } + }, + { + "id": "kerb-height", + "question": { + "en": "What is the height of this kerb?", + "nl": "Hoe hoog is deze stoeprand?", + "de": "Wie hoch ist der Bordstein?" + }, + "render": { + "en": "Kerb height: {kerb:height}", + "nl": "Stoeprandhoogte: {kerb:height}", + "de": "Bordsteinhöhe: {kerb:height}" + }, + "freeform": { + "key": "kerb:height", + "placeholder": { + "en": "Height of the kerb", + "nl": "Hoogte van de stoeprand", + "de": "Höhe des Bordsteins" + }, + "type": "pnat" + }, + "mappings": [ + { + "if": "kerb-height=", + "then": "kerb-height=0" + } + ] } ], "mapRendering": [ diff --git a/assets/layers/walls_and_buildings/walls_and_buildings.json b/assets/layers/walls_and_buildings/walls_and_buildings.json index 133a2bf0f..4ef1816e6 100644 --- a/assets/layers/walls_and_buildings/walls_and_buildings.json +++ b/assets/layers/walls_and_buildings/walls_and_buildings.json @@ -47,7 +47,7 @@ "calculatedTags": [ "_entrance_properties=feat.overlapWith('entrance')?.map(e => e.feat.properties).filter(p => p !== undefined).filter(p => p.width !== undefined)", "_entrance:id=feat.get('_entrance_properties')?.map(e => e.id)?.at(0)", - "_entrance:width=feat.get('_entrance_properties')?.map(e => e.width)" + "_entrance:width=feat.get('_entrance_properties')?.map(e => e.width)?.at(0)" ], "tagRenderings": [ { diff --git a/assets/themes/onwheels/onwheels.json b/assets/themes/onwheels/onwheels.json index 7093afb06..38690d524 100644 --- a/assets/themes/onwheels/onwheels.json +++ b/assets/themes/onwheels/onwheels.json @@ -35,17 +35,23 @@ "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_entrance:width=JSON.parse(feat.properties._poi_walls_and_buildings_entrance_properties)?.width" ], "+tagRenderings": [ { "id": "_poi_entrance:width", - "condition": "entrance=", + "condition": { + "and": [ + "entrance=", + "kerb=" + ] + }, "render": { - "en": "This door has a width of {canonical(_poi_entrance:width)} meter", - "nl": "Deze deur heeft een breedte van {canonical(_poi_entrance:width)} meter", - "de": "Diese Tür hat eine Durchgangsbreite von {canonical(_poi_entrance:width)} Meter", - "es": "Esta puerta tiene una ancho de {canonical(_poi_entrance:width)} metros" + "en": "This door has a width of {canonical(_poi_entrance:width)} meters", + "nl": "Deze deur heeft een breedte van {canonical(_poi_entrance:width)} meter", + "de": "Diese Tür hat eine Durchgangsbreite von {canonical(_poi_entrance:width)} Meter", + "es": "Esta puerta tiene una ancho de {canonical(_poi_entrance:width)} metros" }, "freeform": { "key": "_poi_entrance:width",