Fix: metatagging of width theme

This commit is contained in:
Pieter Vander Vennet 2023-06-30 16:59:42 +02:00
parent 031c4048a6
commit c4ff70ce65

View file

@ -47,20 +47,20 @@
"_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)",
"_parallel_parking_count=feat.get('_has_right_parking') + feat.get('_has_left_parking') /* in javascript logic: true + true == 2*/",
"_width:needed:parking=feat.get('_parallel_parking_count') * feat.get('_car_width')",
"_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",
"_has_sidewalk_right=['right','both'].indexOf(feat.properties['sidewalk']) >= 0",
"_pedestrian_flows_in_carriageway= 2 - feat.get('_has_sidewalk_left') - feat.get('_has_sidewalk_right')",
"_width:needed:pedestrians=feat.get('_pedestrianWidth') * feat.get('_pedestrian_flows_in_carriageway')",
"_pedestrian_flows_in_carriageway= 2 - get(feat)('_has_sidewalk_left') - get(feat)('_has_sidewalk_right')",
"_width:needed:pedestrians=get(feat)('_pedestrianWidth') * get(feat)('_pedestrian_flows_in_carriageway')",
"_oneway_car=(feat.properties['oneway:motor_vehicle'] ?? feat.properties['oneway']) == 'yes'",
"_width:needed:cars=feat.get('_car_width') * (2 - feat.get('_oneway_car'))",
"_width:needed:cars=get(feat)('_car_width') * (2 - get(feat)('_oneway_car'))",
"_cycling_allowed=feat.properties.bicycle != 'use_sidepath' && feat.properties.bicycle!='no'",
"_oneway_bicycle=((feat.properties['oneway:bicycle'] ?? feat.properties['oneway']) == 'yes') && feat.properties['cycleway'] != 'opposite'",
"_width:needed:cyclists=feat.get('_cycling_allowed') ? (feat.get('_cyclistWidth') * (2 - feat.get('_oneway_bicycle'))) : 0",
"_width:needed:total:=feat.get('_width:needed:cars') + feat.get('_width:needed:parking') + feat.get('_width:needed:cyclists') + feat.get('_width:needed:pedestrians')",
"_width:difference:=feat.get('_width:needed:total') - feat.get('width:carriageway')",
"_width:difference:no_pedestrians:=feat.get('_width:difference') - feat.get('_width:needed:pedestrians')"
"_width:needed:cyclists=get(feat)('_cycling_allowed') ? (get(feat)('_cyclistWidth') * (2 - get(feat)('_oneway_bicycle'))) : 0",
"_width:needed:total:=get(feat)('_width:needed:cars') + get(feat)('_width:needed:parking') + get(feat)('_width:needed:cyclists') + get(feat)('_width:needed:pedestrians')",
"_width:difference:=get(feat)('_width:needed:total') - get(feat)('width:carriageway')",
"_width:difference:no_pedestrians:=get(feat)('_width:difference') - get(feat)('_width:needed:pedestrians')"
],
"minzoom": 12,
"source": {
@ -271,4 +271,4 @@
]
}
]
}
}