Closed Cj-Malone closed 2 years ago
WIP for MapComplete
{
"id": "waste_and_recycling",
"title": {
"en": "Waste and Recycling"
},
"shortDescription": {
"en": "Improve recycling centres"
},
"description": {
"en": "Improve recycling centres. Made for OSM UK 2021 Quarterly Project 4"
},
"language": [
"en"
],
"maintainer": "",
"icon": "./assets/svg/bug.svg",
"version": "0",
"startLat": 54,
"startLon": -5,
"startZoom": 6,
"widenFactor": 0.05,
"socialImage": "",
"layers": [
{
"id": "recycling centre layer",
"name": {
"en": "Recycling Centre"
},
"minzoom": 13,
"overpassTags": {
"and": [
"amenity=recycling",
"recycling_type=centre"
]
},
"title": {
"mappings": [],
"render": {
"en": "Recycling Centre"
}
},
"description": {},
"tagRenderings": [
{
"render": {
"en": "Name"
},
"question": {
"en": "What's the name of this centre?"
},
"freeform": {
"key": "name"
},
"mappings": []
},
{
"render": {
"en": "Owner"
},
"question": {
"en": "Who owns this centre?"
},
"freeform": {
"key": "owner"
}
},
{
"render": {
"en": "Operator"
},
"question": {
"en": "Who operates this centre?"
},
"freeform": {
"key": "operator",
"addExtraTags": []
}
},
{
"question": {
"en": "Does this centre accept car batteries?"
},
"multiAnswer": false,
"mappings": [
{
"if": "recycling:car_batteries=yes",
"then": {
"en": "This centre <b>accepts</b> car batteries"
}
},
{
"if": "recycling:car_batteries=no",
"then": {
"en": "This centre does <b>not</b> accept car batteries"
}
}
]
},
{
"question": {
"en": "Does this centre accept cardboard?"
},
"multiAnswer": false,
"mappings": [
{
"if": "recycling:cardboard=yes",
"then": {
"en": "This centre <b>accepts</b> cardboard"
}
},
{
"if": "recycling:cardboard=no",
"then": {
"en": "This centre does <b>not</b> accept cardboard"
}
}
]
},
{
"question": {
"en": "Does this centre accept carpet?"
},
"multiAnswer": false,
"mappings": [
{
"if": "recycling:carpet=yes",
"then": {
"en": "This centre <b>accepts</b> carpet"
}
},
{
"if": "recycling:carpet=no",
"then": {
"en": "This centre does <b>not</b> accept carpet"
}
}
]
},
{
"question": {
"en": "Does this centre accept cooking oil?"
},
"multiAnswer": false,
"mappings": [
{
"if": "recycling:cooking_oil=yes",
"then": {
"en": "This centre <b>accepts</b> cooking oil"
}
},
{
"if": "recycling:cooking_oil=no",
"then": {
"en": "This centre does <b>not</b> accept cooking oil"
}
}
]
},
{
"question": {
"en": "Does this centre accept electrical items?"
},
"multiAnswer": false,
"mappings": [
{
"if": "recycling:electrical_items=yes",
"then": {
"en": "This centre <b>accepts</b> electrical items"
}
},
{
"if": "recycling:electrical_items=no",
"then": {
"en": "This centre does <b>not</b> accept electrical items"
}
}
]
},
{
"question": {
"en": "Does this centre accept engine oil?"
},
"multiAnswer": false,
"mappings": [
{
"if": "recycling:engine_oil=yes",
"then": {
"en": "This centre <b>accepts</b> engine oil"
}
},
{
"if": "recycling:engine_oil=no",
"then": {
"en": "This centre does <b>not</b> accept engine oil"
}
}
]
},
{
"question": {
"en": "Does this centre accept fluorescent tubes?"
},
"multiAnswer": false,
"mappings": [
{
"if": "recycling:fluorescent_tubes=yes",
"then": {
"en": "This centre <b>accepts</b> fluorescent tubes"
}
},
{
"if": "recycling:fluorescent_tubes=no",
"then": {
"en": "This centre does <b>not</b> accept fluorescent tubes"
}
}
]
},
{
"question": {
"en": "Does this centre accept food and drink cans?"
},
"multiAnswer": false,
"mappings": [
{
"if": "recycling:cans=yes",
"then": {
"en": "This centre <b>accepts</b> food and drink cans"
}
},
{
"if": "recycling:cans=no",
"then": {
"en": "This centre does <b>not</b> accept food and drink cans"
}
}
]
},
{
"question": {
"en": "Does this centre accept white goods (fridges and freezers)?"
},
"multiAnswer": false,
"mappings": [
{
"if": "recycling:white_goods=yes",
"then": {
"en": "This centre <b>accepts</b> white goods"
}
},
{
"if": "recycling:white_goods=no",
"then": {
"en": "This centre does <b>not</b> accept white goods"
}
}
]
},
{
"question": {
"en": "Does this centre accept glass bottles and jars?"
},
"multiAnswer": false,
"mappings": [
{
"if": "recycling:glass_bottles=yes",
"then": {
"en": "This centre <b>accepts</b> glass bottles and jars"
}
},
{
"if": "recycling:glass_bottles=no",
"then": {
"en": "This centre does <b>not</b> accept glass bottles and jars"
}
}
]
},
{
"question": {
"en": "Does this centre accept household batteries?"
},
"multiAnswer": false,
"mappings": [
{
"if": "recycling:batteries=yes",
"then": {
"en": "This centre <b>accepts</b> household batteries"
}
},
{
"if": "recycling:batteries=no",
"then": {
"en": "This centre does <b>not</b> accept household batteries"
}
}
]
},
{
"question": {
"en": "Does this centre accept paper?"
},
"multiAnswer": false,
"mappings": [
{
"if": "recycling:paper=yes",
"then": {
"en": "This centre <b>accepts</b> paper"
}
},
{
"if": "recycling:paper=no",
"then": {
"en": "This centre does <b>not</b> accept paper"
}
}
]
},
{
"question": {
"en": "Does this centre accept plastic bottles?"
},
"multiAnswer": false,
"mappings": [
{
"if": "recycling:plastic_bottles=yes",
"then": {
"en": "This centre <b>accepts</b> plastic bottles"
}
},
{
"if": "recycling:plastic_bottles=no",
"then": {
"en": "This centre does <b>not</b> accept plastic bottles"
}
}
]
},
{
"question": {
"en": "Does this centre accept scrap metal?"
},
"multiAnswer": false,
"mappings": [
{
"if": "recycling:scrap_metal=yes",
"then": {
"en": "This centre <b>accepts</b> scrap metal"
}
},
{
"if": "recycling:scrap_metal=no",
"then": {
"en": "This centre does <b>not</b> accept scrap metal"
}
}
]
},
{
"question": {
"en": "Does this centre accept televisions?"
},
"multiAnswer": false,
"mappings": [
{
"if": "recycling:tv_monitor=yes",
"then": {
"en": "This centre <b>accepts</b> televisions"
}
},
{
"if": "recycling:tv_monitor=no",
"then": {
"en": "This centre does <b>not</b> accept televisions"
}
}
]
},
{
"question": {
"en": "Does this centre accept wood?"
},
"multiAnswer": false,
"mappings": [
{
"if": "recycling:wood=yes",
"then": {
"en": "This centre <b>accepts</b> wood"
}
},
{
"if": "recycling:wood=no",
"then": {
"en": "This centre does <b>not</b> accept wood"
}
}
]
}
],
"hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "./assets/svg/bug.svg"
},
"width": {
"render": "8"
},
"iconSize": {
"render": "40,40,center"
},
"color": {
"render": "#00f"
},
"presets": []
}
],
"roamingRenderings": []
}
That is already a pretty good start!
For the 'does this container center accept', I'd personally be more inclined to use a multiAnswer (over multiple keys) after all - but with an 'ifnot' set too. An example for that can be found here
This way, it'll be a lot more succint. Users will only have to check the corresponding checkboxes
Thanks, when I tried multiAnswer
before I had issues, but just realised that will have been because I had my answers in separate mappings
.
Oh, OK and I'd merge it down into a single question
. However it looks like then I can't skip an answer, it forces every tag in the question to yes or no.
{
"id": "waste_and_recycling",
"title": {
"en": "Waste and Recycling"
},
"shortDescription": {
"en": "Improve recycling centres"
},
"description": {
"en": "Improve recycling centres. Made for OSM UK 2021 Quarterly Project 4"
},
"language": [
"en"
],
"maintainer": "",
"icon": "./assets/svg/bug.svg",
"version": "0",
"startLat": 54,
"startLon": -5,
"startZoom": 6,
"widenFactor": 0.05,
"socialImage": "",
"layers": [
{
"id": "recycling centre layer",
"name": {
"en": "Recycling Centre"
},
"minzoom": 13,
"overpassTags": {
"and": [
"amenity=recycling",
"recycling_type=centre"
]
},
"title": {
"mappings": [],
"render": {
"en": "Recycling Centre"
}
},
"description": {},
"tagRenderings": [
{
"render": {
"en": "Name"
},
"question": {
"en": "What's the name of this centre?"
},
"freeform": {
"key": "name"
},
"mappings": []
},
{
"render": {
"en": "Owner"
},
"question": {
"en": "Who owns this centre?"
},
"freeform": {
"key": "owner"
}
},
{
"render": {
"en": "Operator"
},
"question": {
"en": "Who operates this centre?"
},
"freeform": {
"key": "operator",
"addExtraTags": []
}
},
{
"question": {
"en": "Which materials does this centre accept?"
},
"multiAnswer": true,
"hideInAnswer": true,
"mappings": [
{
"if": "recycling:car_batteries=yes",
"then": {
"en": "This centre <b>accepts</b> car batteries"
},
"ifnot": "recycling:car_batteries=no",
"then": {
"en": "This centre does <b>not</b> accept car batteries"
}
},
{
"if": "recycling:cardboard=yes",
"ifnot": "recycling:cardboard=no",
"then": {
"en": "This centre <b>accepts</b> cardboard"
}
},
{
"if": "recycling:carpet=yes",
"ifnot": "recycling:carpet=no",
"then": {
"en": "This centre <b>accepts</b> carpet"
}
},
{
"if": "recycling:cooking_oil=yes",
"ifnot": "recycling:cooking_oil=no",
"then": {
"en": "This centre <b>accepts</b> cooking oil"
}
},
{
"if": "recycling:electrical_items=yes",
"ifnot": "recycling:electrical_items=no",
"then": {
"en": "This centre <b>accepts</b> electrical items"
}
},
{
"if": "recycling:engine_oil=yes",
"ifnot": "recycling:engine_oil=no",
"then": {
"en": "This centre <b>accepts</b> engine oil"
}
},
{
"if": "recycling:fluorescent_tubes=yes",
"ifnot": "recycling:fluorescent_tubes=no",
"then": {
"en": "This centre <b>accepts</b> fluorescent tubes"
}
},
{
"if": "recycling:cans=yes",
"ifnot": "recycling:cans=no",
"then": {
"en": "This centre <b>accepts</b> food and drink cans"
}
},
{
"if": "recycling:white_goods=yes",
"ifnot": "recycling:white_goods=no",
"then": {
"en": "This centre <b>accepts</b> white goods"
}
},
{
"if": "recycling:glass_bottles=yes",
"ifnot": "recycling:glass_bottles=no",
"then": {
"en": "This centre <b>accepts</b> glass bottles and jars"
}
},
{
"if": "recycling:batteries=yes",
"ifnot": "recycling:batteries=no",
"then": {
"en": "This centre <b>accepts</b> household batteries"
}
},
{
"if": "recycling:paper=yes",
"ifnot": "recycling:paper=no",
"then": {
"en": "This centre <b>accepts</b> paper"
}
},
{
"if": "recycling:plastic_bottles=yes",
"ifnot": "recycling:plastic_bottles=no",
"then": {
"en": "This centre <b>accepts</b> plastic bottles"
}
},
{
"if": "recycling:scrap_metal=yes",
"ifnot": "recycling:scrap_metal=no",
"then": {
"en": "This centre <b>accepts</b> scrap metal"
}
},
{
"if": "recycling:tv_monitor=yes",
"ifnot": "recycling:tv_monitor=no",
"then": {
"en": "This centre <b>accepts</b> televisions"
}
},
{
"if": "recycling:wood=yes",
"ifnot": "recycling:wood=no",
"then": {
"en": "This centre <b>accepts</b> wood"
}
}
]
}
],
"hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "./assets/svg/bug.svg"
},
"width": {
"render": "8"
},
"iconSize": {
"render": "40,40,center"
},
"color": {
"render": "#00f"
},
"presets": []
}
],
"roamingRenderings": []
}
However it looks like then I can't skip an answer, it forces every tag in the question to yes or no.
Yes, that indeed is a drawback of this approach...
Potentially we could put the popular ones in a multi answer, and have the less common ones that may be unknown as separate questions, but I think I'll stick with the first approach for now.
I think we should wait for Monday to announce it on TalkGB. Weekdays are more active for mappers, so might get slightly more attention. It would be interesting to see the engagement stats on Twitter and Instagram.