forked from MapComplete/MapComplete
Merge branch 'develop' into feature/vending-machine
This commit is contained in:
commit
ac64e97ede
54 changed files with 644 additions and 107 deletions
|
@ -335,7 +335,98 @@
|
|||
"reviews"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"builtin": [
|
||||
"shops"
|
||||
],
|
||||
"override": {
|
||||
"id": "shops_with_climbing_shoe_repair",
|
||||
"source": {
|
||||
"=osmTags": {
|
||||
"and": [
|
||||
"service:repair:climbing_shoes=yes",
|
||||
{
|
||||
"or": [
|
||||
"shop=shoe_repair",
|
||||
"craft=shoemaker"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"=presets": [],
|
||||
"minzoom": 8,
|
||||
"+tagRenderings": [
|
||||
{
|
||||
"id": "repairs_climbing_shoes",
|
||||
"question": {
|
||||
"en": "Does this shoe repair shop repair climbing shoes?"
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
"if": "service:repair:climbing_shoes=yes",
|
||||
"then": {
|
||||
"en": "This shop repairs climbing shoes"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": "service:repair:climbing_shoes=no",
|
||||
"then": {
|
||||
"en": "This shop does not repair climbing shoes"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"builtin": [
|
||||
"shops"
|
||||
],
|
||||
"override": {
|
||||
"=osmTags": {
|
||||
"or": [
|
||||
"shop=shoe_repair",
|
||||
"craft=shoemaker"
|
||||
]
|
||||
},
|
||||
"minzoom": 16,
|
||||
"+tagRenderings": [
|
||||
{
|
||||
"id": "repairs_climbing_shoes",
|
||||
"question": {
|
||||
"en": "Does this shoe repair shop also repair clibming shoes?"
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
"if": "service:repair:climbing_shoes=yes",
|
||||
"then": {
|
||||
"en": "This shop repairs climbing shoes"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": "service:repair:climbing_shoes=no",
|
||||
"then": {
|
||||
"en": "This shop does not repair climbing shoes"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"=presets": [
|
||||
{
|
||||
"tags": [
|
||||
"shop=shoe_repair"
|
||||
],
|
||||
"title": {
|
||||
"en": "a shoe repair shop"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"credits": "Christian Neumann <christian@utopicode.de>"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 @@
|
|||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue