diff --git a/assets/themes/width/width.json b/assets/themes/width/width.json index 47e007b3b..e2de717aa 100644 --- a/assets/themes/width/width.json +++ b/assets/themes/width/width.json @@ -26,9 +26,9 @@ "_car_width:=2 /* The width that a single car needs */", "_cyclistWidth:=1.5 /* The width a single cyclist needs to be safely overtaken */", "_pedestrianWidth:=0.75 /* The width a pedestrian needs if sidewalks are missing */", - "_has_left_parking=(feat.properties['parking:lane:left'] ?? feat.properties['parking:lane:both']) === 'parallel'", - "_has_right_parking=(feat.properties['parking:lane:right'] ?? feat.properties['parking:lane:both']) === 'parallel'", - "_has_other_parking= ['parking:lane:left','parking:lane:right','parking:lane:both'].some(key => ['perpendicular','diagonal'].indexOf(feat.properties[key]) >= 0)", + "_has_left_parking=['lane','yes', 'parallel'].indexOf(feat.properties['parking:left'] ?? feat.properties['parking:both']) >= 0", + "_has_right_parking=['lane','yes','parallel'].indexOf(feat.properties['parking:right'] ?? feat.properties['parking:both']) >= 0", + "_has_other_parking= ['parking:left:orientation','parking:right:orientation','parking:both:orientation'].some(key => ['perpendicular','diagonal'].indexOf(feat.properties[key]) >= 0)", "_parallel_parking_count=get(feat)('_has_right_parking') + get(feat)('_has_left_parking') /* in javascript logic: true + true == 2*/", "_width:needed:parking=get(feat)('_parallel_parking_count') * get(feat)('_car_width')", "_has_sidewalk_left=['left','both'].indexOf(feat.properties['sidewalk']) >= 0", @@ -154,7 +154,6 @@ }, { "id": "has_sidewalks", - "condition": "id=disabled", "question": { "nl": "Heeft deze straat voetpaden?" }, @@ -184,7 +183,9 @@ } } ] - } + }, + "questions", + "{nearby_images(closed,readonly)}" ], "pointRendering": [ { @@ -239,6 +240,67 @@ } } ] + }, + { + "id": "street_no_width", + "description": "Typical city streets with width", + "name": { + "nl": "Straten zonder breedte" + }, + "source": { + "osmTags": { + "and": [ + "width:carriageway=", + { + "or": [ + "highway=residential", + "highway=unclassified", + "highway=tertiary", + "highway=living_street" + ] + } + ] + } + }, + "minzoom": 19, + "title": { + "render": { + "nl": "{name}" + }, + "mappings": [ + { + "if": "name=", + "then": { + "nl": "Naamloos segment" + } + } + ] + }, + "tagRenderings": [ + { + "id": "carriageway_width", + "render": "Deze straat is {width:carriageway}m breed", + "question": "Hoe breed is deze straat?", + "freeform": { + "key": "width:carriageway", + "type": "distance", + "helperArgs": { + "zoom": 21, + "background": "map" + } + } + } + ], + "pointRendering": null, + "lineRendering": [ + { + "color": "#ff00ff", + "width": "4" + } + ], + "allowMove": false, + "allowSplit": true, + "allowDeletion": false } ], "lockLocation": [