From 67319fc8d9741b9e96e6182bdf04624e49c3f963 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Sat, 1 Jan 2022 00:03:08 +0100 Subject: [PATCH 01/26] =?UTF-8?q?Test=20with=20waste=20theme=20(Happy=20Ne?= =?UTF-8?q?w=20Year=F0=9F=8E=87=F0=9F=8E=89)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/layers/recycling/license_info.json | 12 +++++ assets/layers/recycling/recycling-14.svg | 40 +++++++++++++++++ assets/layers/recycling/recycling.json | 53 +++++++++++++++++++++++ assets/themes/waste/waste.json | 29 +++++++++++++ 4 files changed, 134 insertions(+) create mode 100644 assets/layers/recycling/license_info.json create mode 100644 assets/layers/recycling/recycling-14.svg create mode 100644 assets/layers/recycling/recycling.json create mode 100644 assets/themes/waste/waste.json diff --git a/assets/layers/recycling/license_info.json b/assets/layers/recycling/license_info.json new file mode 100644 index 000000000..035586de7 --- /dev/null +++ b/assets/layers/recycling/license_info.json @@ -0,0 +1,12 @@ +[ + { + "path": "recycling-14.svg", + "license": "CC0-1.0", + "authors": [ + "Michael Glanznig" + ], + "sources": [ + "https://github.com/gmgeo/osmic/blob/master/amenity/recycling-14.svg" + ] + } +] \ No newline at end of file diff --git a/assets/layers/recycling/recycling-14.svg b/assets/layers/recycling/recycling-14.svg new file mode 100644 index 000000000..6244f4124 --- /dev/null +++ b/assets/layers/recycling/recycling-14.svg @@ -0,0 +1,40 @@ + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/assets/layers/recycling/recycling.json b/assets/layers/recycling/recycling.json new file mode 100644 index 000000000..1fc67853a --- /dev/null +++ b/assets/layers/recycling/recycling.json @@ -0,0 +1,53 @@ +{ + "id": "recycling", + "name": { + "en": "Recycling", + "nl": "Recycling" + }, + "description": { + "en": "A layer with recycling containers and centres", + "nl": "Een laag met recyclagingcontainers en -centrums" + }, + "source": { + "osmTags": "amenity=recycling" + }, + "minzoom": 12, + "title": { + "render": { + "en": "Recycling facility", + "nl": "Recyclingfaciliteit" + } + }, + "mapRendering": [ + { + "location": [ + "point", + "centroid" + ], + "icon": "./assets/layers/recycling/recycling-14.svg" + } + ], + "presets": [], + "tagRenderings": [ + { + "id": "recycling-type", + "mappings": [ + { + "if": "recycling-type=container", + "then": { + "en": "This is a recycling container", + "nl": "Dit is een recyclingcontainer" + } + }, + { + "if": "recycling-type=centre", + "then": { + "en": "This is a recycling centre", + "nl": "Dit is een recyclingcentrum" + } + } + ] + } + ], + "filter": [] +} \ No newline at end of file diff --git a/assets/themes/waste/waste.json b/assets/themes/waste/waste.json new file mode 100644 index 000000000..4e70754d2 --- /dev/null +++ b/assets/themes/waste/waste.json @@ -0,0 +1,29 @@ +{ + "id": "waste", + "maintainer": "", + "version": "2021-12-31", + "language": [ + "en", + "nl" + ], + "title": { + "en": "Waste", + "nl": "Afval" + }, + "description": { + "en": "Map showing waste baskets and recycling facilities.", + "nl": "Kaart met afvalbakken en recyclingfaciliteiten." + }, + "icon": "./assets/layers/recycling/recycling-14.svg", + "startZoom": 19, + "startLat": 53.24865, + "startLon": 6.60075, + "layers": [ + { + "builtin": "waste_basket", + "override": { + "minzoom": 12 + } + } + ] +} \ No newline at end of file From 7ee50a4c9d2c8b4926d820a24889e2c08fd5f2a1 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Sat, 1 Jan 2022 00:43:04 +0100 Subject: [PATCH 02/26] Include recycling layer --- assets/themes/waste/waste.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assets/themes/waste/waste.json b/assets/themes/waste/waste.json index 4e70754d2..74f481338 100644 --- a/assets/themes/waste/waste.json +++ b/assets/themes/waste/waste.json @@ -24,6 +24,9 @@ "override": { "minzoom": 12 } + }, + { + "builtin": "recycling" } ] } \ No newline at end of file From 5a6e566fe2033a31c5945969247629c7f9b6c258 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Sat, 1 Jan 2022 02:56:06 +0100 Subject: [PATCH 03/26] Added recycling types --- assets/layers/recycling/batteries.svg | 15 + assets/layers/recycling/beverage_cartons.svg | 20 + assets/layers/recycling/cans.svg | 41 ++ assets/layers/recycling/clothes.svg | 18 + assets/layers/recycling/cooking_oil.svg | 32 ++ assets/layers/recycling/engine_oil.svg | 19 + assets/layers/recycling/garden_waste.svg | 22 + assets/layers/recycling/glass.svg | 25 ++ assets/layers/recycling/glass_bottles.svg | 18 + assets/layers/recycling/license_info.json | 176 +++++++- assets/layers/recycling/newspaper.svg | 13 + assets/layers/recycling/paper.svg | 33 ++ assets/layers/recycling/plastic.svg | 78 ++++ assets/layers/recycling/plastic_bottles.svg | 21 + assets/layers/recycling/plastic_packaging.svg | 55 +++ assets/layers/recycling/recycling.json | 376 +++++++++++++++++- assets/layers/recycling/scrap_metal.svg | 19 + assets/layers/recycling/shoes.svg | 24 ++ .../recycling/small_electrical_appliances.svg | 44 ++ 19 files changed, 1044 insertions(+), 5 deletions(-) create mode 100644 assets/layers/recycling/batteries.svg create mode 100644 assets/layers/recycling/beverage_cartons.svg create mode 100644 assets/layers/recycling/cans.svg create mode 100644 assets/layers/recycling/clothes.svg create mode 100644 assets/layers/recycling/cooking_oil.svg create mode 100644 assets/layers/recycling/engine_oil.svg create mode 100644 assets/layers/recycling/garden_waste.svg create mode 100644 assets/layers/recycling/glass.svg create mode 100644 assets/layers/recycling/glass_bottles.svg create mode 100644 assets/layers/recycling/newspaper.svg create mode 100644 assets/layers/recycling/paper.svg create mode 100644 assets/layers/recycling/plastic.svg create mode 100644 assets/layers/recycling/plastic_bottles.svg create mode 100644 assets/layers/recycling/plastic_packaging.svg create mode 100644 assets/layers/recycling/scrap_metal.svg create mode 100644 assets/layers/recycling/shoes.svg create mode 100644 assets/layers/recycling/small_electrical_appliances.svg diff --git a/assets/layers/recycling/batteries.svg b/assets/layers/recycling/batteries.svg new file mode 100644 index 000000000..2ba547473 --- /dev/null +++ b/assets/layers/recycling/batteries.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/assets/layers/recycling/beverage_cartons.svg b/assets/layers/recycling/beverage_cartons.svg new file mode 100644 index 000000000..05909ef8f --- /dev/null +++ b/assets/layers/recycling/beverage_cartons.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/assets/layers/recycling/cans.svg b/assets/layers/recycling/cans.svg new file mode 100644 index 000000000..2aaff3f9a --- /dev/null +++ b/assets/layers/recycling/cans.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/layers/recycling/clothes.svg b/assets/layers/recycling/clothes.svg new file mode 100644 index 000000000..f99861248 --- /dev/null +++ b/assets/layers/recycling/clothes.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/assets/layers/recycling/cooking_oil.svg b/assets/layers/recycling/cooking_oil.svg new file mode 100644 index 000000000..7a742beab --- /dev/null +++ b/assets/layers/recycling/cooking_oil.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/layers/recycling/engine_oil.svg b/assets/layers/recycling/engine_oil.svg new file mode 100644 index 000000000..f92afd355 --- /dev/null +++ b/assets/layers/recycling/engine_oil.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/assets/layers/recycling/garden_waste.svg b/assets/layers/recycling/garden_waste.svg new file mode 100644 index 000000000..8788c1147 --- /dev/null +++ b/assets/layers/recycling/garden_waste.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/layers/recycling/glass.svg b/assets/layers/recycling/glass.svg new file mode 100644 index 000000000..46488037e --- /dev/null +++ b/assets/layers/recycling/glass.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/layers/recycling/glass_bottles.svg b/assets/layers/recycling/glass_bottles.svg new file mode 100644 index 000000000..7d234e991 --- /dev/null +++ b/assets/layers/recycling/glass_bottles.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/assets/layers/recycling/license_info.json b/assets/layers/recycling/license_info.json index 035586de7..ec788ff43 100644 --- a/assets/layers/recycling/license_info.json +++ b/assets/layers/recycling/license_info.json @@ -1,12 +1,186 @@ [ + { + "path": "batteries.svg", + "license": "CC-BY-SA", + "authors": [ + "Tobias Zwick" + ], + "sources": [ + "https://github.com/streetcomplete/StreetComplete/blob/master/res/graphics/recycling%20icons/batteries.svg" + ] + }, + { + "path": "beverage_cartons.svg", + "license": "CC-BY-SA", + "authors": [ + "Tobias Zwick" + ], + "sources": [ + "https://github.com/streetcomplete/StreetComplete/blob/master/res/graphics/recycling%20icons/beverage_cartons.svg" + ] + }, + { + "path": "cans.svg", + "license": "CC-BY-SA", + "authors": [ + "Tobias Zwick" + ], + "sources": [ + "https://github.com/streetcomplete/StreetComplete/blob/master/res/graphics/recycling%20icons/cans.svg" + ] + }, + { + "path": "clothes.svg", + "license": "CC-BY-SA", + "authors": [ + "Adrien Pavie", + "modified from EmojiOne 2: U+1F456, U+1F45" + ], + "sources": [ + "https://github.com/streetcomplete/StreetComplete/blob/master/res/graphics/recycling%20icons/clothes.svg" + ] + }, + { + "path": "cooking_oil.svg", + "license": "CC-BY-SA", + "authors": [ + "Tobias Zwick" + ], + "sources": [ + "https://github.com/streetcomplete/StreetComplete/blob/master/res/graphics/recycling%20icons/cooking_oil.svg" + ] + }, + { + "path": "engine_oil.svg", + "license": "CC-BY-SA", + "authors": [ + "Tobias Zwick" + ], + "sources": [ + "https://github.com/streetcomplete/StreetComplete/blob/master/res/graphics/recycling%20icons/engine_oil.svg" + ] + }, + { + "path": "garden_waste.svg", + "license": "CC-BY-SA", + "authors": [ + "Tobias Zwick", + "modified from Twemoji: U+1F33F" + ], + "sources": [ + "https://github.com/streetcomplete/StreetComplete/blob/master/res/graphics/recycling%20icons/garden_waste.svg" + ] + }, + { + "path": "glass.svg", + "license": "CC-BY-SA", + "authors": [ + "Tobias Zwick" + ], + "sources": [ + "https://github.com/streetcomplete/StreetComplete/blob/master/res/graphics/recycling%20icons/glass.svg" + ] + }, + { + "path": "glass_bottles.svg", + "license": "CC-BY-SA", + "authors": [ + "Tobias Zwick" + ], + "sources": [ + "https://github.com/streetcomplete/StreetComplete/blob/master/res/graphics/recycling%20icons/glass_bottles.svg" + ] + }, + { + "path": "newspaper.svg", + "license": "CC-BY-SA", + "authors": [ + "Tobias Zwick", + "modified from EmojiOne 2: U+1F4F0" + ], + "sources": [ + "https://github.com/streetcomplete/StreetComplete/blob/master/res/graphics/recycling%20icons/newspaper.svg" + ] + }, + { + "path": "paper.svg", + "license": "CC-BY-SA", + "authors": [ + "Tobias Zwick" + ], + "sources": [ + "https://github.com/streetcomplete/StreetComplete/blob/master/res/graphics/recycling%20icons/paper.svg" + ] + }, + { + "path": "plastic.svg", + "license": "CC-BY-SA", + "authors": [ + "Tobias Zwick" + ], + "sources": [ + "https://github.com/streetcomplete/StreetComplete/blob/master/res/graphics/recycling%20icons/plastic.svg" + ] + }, + { + "path": "plastic_bottles.svg", + "license": "CC-BY-SA", + "authors": [ + "Tobias Zwick" + ], + "sources": [ + "https://github.com/streetcomplete/StreetComplete/blob/master/res/graphics/recycling%20icons/plastic_bottles.svg" + ] + }, + { + "path": "plastic_packaging.svg", + "license": "CC-BY-SA", + "authors": [ + "Tobias Zwick" + ], + "sources": [ + "https://github.com/streetcomplete/StreetComplete/blob/master/res/graphics/recycling%20icons/plastic_packaging.svg" + ] + }, { "path": "recycling-14.svg", - "license": "CC0-1.0", + "license": "CC0", "authors": [ "Michael Glanznig" ], "sources": [ "https://github.com/gmgeo/osmic/blob/master/amenity/recycling-14.svg" ] + }, + { + "path": "scrap_metal.svg", + "license": "CC-BY-SA", + "authors": [ + "Tobias Zwick" + ], + "sources": [ + "https://github.com/streetcomplete/StreetComplete/blob/master/res/graphics/recycling%20icons/scrap_metal.svg" + ] + }, + { + "path": "shoes.svg", + "license": "CC-BY-SA", + "authors": [ + "Tobias Zwick", + "modified from EmojiOne 2: U+1F45F" + ], + "sources": [ + "https://github.com/streetcomplete/StreetComplete/blob/master/res/graphics/recycling%20icons/shoes.svg" + ] + }, + { + "path": "small_electrical_appliances.svg", + "license": "CC-BY-SA", + "authors": [ + "EmojiOne 2: U+1F50C" + ], + "sources": [ + "https://github.com/streetcomplete/StreetComplete/blob/master/res/graphics/recycling%20icons/small_electrical_appliances.svg" + ] } ] \ No newline at end of file diff --git a/assets/layers/recycling/newspaper.svg b/assets/layers/recycling/newspaper.svg new file mode 100644 index 000000000..19ffa9d54 --- /dev/null +++ b/assets/layers/recycling/newspaper.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/assets/layers/recycling/paper.svg b/assets/layers/recycling/paper.svg new file mode 100644 index 000000000..76cb42217 --- /dev/null +++ b/assets/layers/recycling/paper.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/layers/recycling/plastic.svg b/assets/layers/recycling/plastic.svg new file mode 100644 index 000000000..755c2e865 --- /dev/null +++ b/assets/layers/recycling/plastic.svg @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/layers/recycling/plastic_bottles.svg b/assets/layers/recycling/plastic_bottles.svg new file mode 100644 index 000000000..669312972 --- /dev/null +++ b/assets/layers/recycling/plastic_bottles.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/layers/recycling/plastic_packaging.svg b/assets/layers/recycling/plastic_packaging.svg new file mode 100644 index 000000000..7ae9d650f --- /dev/null +++ b/assets/layers/recycling/plastic_packaging.svg @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/layers/recycling/recycling.json b/assets/layers/recycling/recycling.json index 1fc67853a..c5b8edbd8 100644 --- a/assets/layers/recycling/recycling.json +++ b/assets/layers/recycling/recycling.json @@ -27,27 +27,395 @@ "icon": "./assets/layers/recycling/recycling-14.svg" } ], - "presets": [], + "presets": [ + { + "title": { + "en": "recycling container", + "nl": "recycling container" + }, + "tags": [ + "amenity=recycling", + "recycling_type=container" + ] + }, + { + "title": { + "en": "recycling centre", + "nl": "recycling centre" + }, + "tags": [ + "amenity=recycling", + "recycling_type=centre" + ] + } + ], "tagRenderings": [ { "id": "recycling-type", + "question": { + "en": "What type of recycling is this?", + "nl": "Wat voor soort recycling is dit?" + }, "mappings": [ { - "if": "recycling-type=container", + "if": "recycling_type=container", "then": { "en": "This is a recycling container", "nl": "Dit is een recyclingcontainer" } }, { - "if": "recycling-type=centre", + "if": "recycling_type=centre", "then": { "en": "This is a recycling centre", "nl": "Dit is een recyclingcentrum" } } ] + }, + { + "id": "container-underground", + "question": { + "en": "Is this container underground?", + "nl": "Is deze container ondergrond?" + }, + "condition": "recycling_type=container", + "mappings": [ + { + "if": "location=underground", + "then": { + "en": "This is an underground container", + "nl": "Dit is een ondergrondse container" + } + }, + { + "if": "location=", + "then": { + "en": "This container is not underground", + "nl": "Deze container is niet ondergronds" + } + } + ] + }, + { + "id": "recycling-accepts", + "question": { + "en": "What can be recycled here?", + "nl": "Wat kan hier gerecycled worden?" + }, + "multiAnswer": true, + "mappings": [ + { + "if": "recycling:batteries=yes", + "ifnot": "recycling:batteries=", + "then": { + "en": "
Batteries can be recycled here
", + "nl": "
Batterijen kunnen hier gerecycled worden
" + } + }, + { + "if": "recycling:beverage_cartons=yes", + "ifnot": "recycling:beverage_cartons=", + "then": { + "en": "
Beverage cartons can be recycled here
", + "nl": "
Drankpakken kunnen hier gerecycled worden
" + } + }, + { + "if": "recycling:cans=yes", + "ifnot": "recycling:cans=", + "then": { + "en": "
Cans can be recycled here
", + "nl": "
Blikken kunnen hier gerecycled worden
" + } + }, + { + "if": "recycling:clothes=yes", + "ifnot": "recycling:clothes=", + "then": { + "en": "
Clothes can be recycled here
", + "nl": "
Kleren kunnen hier gerecycled worden
" + } + }, + { + "if": "recycling:cooking_oil=yes", + "ifnot": "recycling:cooking_oil=", + "then": { + "en": "
Cooking oil can be recycled here
", + "nl": "
Frituurvet kan hier gerecycled worden
" + } + }, + { + "if": "recycling:engine_oil=yes", + "ifnot": "recycling:engine_oil=", + "then": { + "en": "
Engine oil can be recycled here
", + "nl": "
Motorolie kan hier gerecycled worden
" + } + }, + { + "if": "recycling:green_waste=yes", + "ifnot": "recycling:green_waste=", + "then": { + "en": "
Green waste can be recycled here
", + "nl": "
Groen afval kan hier gerecycled worden
" + } + }, + { + "if": "recycling:glass_bottles=yes", + "ifnot": "recycling:glass_bottles=", + "then": { + "en": "
Glass bottles can be recycled here
", + "nl": "
Glazen flessen kunnen hier gerecycled worden
" + } + }, + { + "if": "recycling:glass=yes", + "ifnot": "recycling:glass=", + "then": { + "en": "
Glass can be recycled here
", + "nl": "
Glas kan hier gerecycled worden
" + } + }, + { + "if": "recycling:newspaper=yes", + "ifnot": "recycling:newspaper=", + "then": { + "en": "
Newspapers can be recycled here
", + "nl": "
Kranten kunnen hier gerecycled worden
" + } + }, + { + "if": "recycling:paper=yes", + "ifnot": "recycling:paper=", + "then": { + "en": "
Paper can be recycled here
", + "nl": "
Papier kan hier gerecycled worden
" + } + }, + { + "if": "recycling:plastic_bottles=yes", + "ifnot": "recycling:plastic_bottles=", + "then": { + "en": "
Plastic bottles can be recycled here
", + "nl": "
Plastic flessen kunnen hier gerecycled worden
" + } + }, + { + "if": "recycling:plastic_packaging=yes", + "ifnot": "recycling:plastic_packaging=", + "then": { + "en": "
Plastic packaging can be recycled here
", + "nl": "
Plastic verpakking kan hier gerecycled worden
" + } + }, + { + "if": "recylcing:plastic=yes", + "ifnot": "recycling:plastic=", + "then": { + "en": "
Plastic can be recycled here
", + "nl": "
Plastic kan hier gerecycled worden
" + } + }, + { + "if": "recycling:scrap_metal=yes", + "ifnot": "recycling:scrap_metal=", + "then": { + "en": "
Scrap metal can be recycled here
", + "nl": "
Oud metaal kan hier gerecycled worden
" + } + }, + { + "if": "recycling:shoes=yes", + "ifnot": "recycling:shoes=", + "then": { + "en": "
Shoes can be recycled here
", + "nl": "
Schoenen kunnen hier gerecycled worden
" + } + }, + { + "if": "recycling:small_electrical_appliances=yes", + "ifnot": "recycling:small_electrical_appliances=", + "then": { + "en": "
Small electrical appliances can be recycled here
", + "nl": "
Kleine elektronische apparaten kunnen hier gerecycled worden
" + } + } + ] + }, + { + "id": "operator", + "render": { + "en": "This recycling facility is operated by {operator}", + "nl": "Deze recyclingfaciliteit wordt beheerd door {operator}" + }, + "question": { + "en": "What company operates this recycling facility?", + "nl": "Wat is de beheerder van deze recyclingfaciliteit?" + }, + "freeform": { + "key": "operator", + "type": "string" + } + }, + { + "id": "opening_hours", + "render": "{opening_hours_table()}", + "question": { + "en": "What are the opening hours of this recycling facility?", + "nl": "Wat zijn de openingstijden van deze recyclingfaciliteit?" + }, + "freeform": { + "key": "opening_hours", + "type": "opening_hours" + }, + "mappings": [ + { + "if": "opening_hours=24/7", + "then": { + "en": "24/7", + "nl": "24/7" + } + } + ] } ], - "filter": [] + "filter": [ + { + "id": "isOpen", + "options": [ + { + "question": { + "en": "Currently open", + "nl": "Op dit moment open" + }, + "osmTags": "_isOpen=yes" + } + ] + }, + { + "id": "recyclingType", + "options": [ + { + "question": { + "en": "All recycling types", + "nl": "Alle recyclingtypes" + } + }, + { + "question": { + "en": "Recycling of batteries", + "nl": "Recycling van batterijen" + }, + "osmTags": "recycling:batteries=yes" + }, + { + "question": { + "en": "Recycling of beverage cartons", + "nl": "Recycling van drankpakken" + }, + "osmTags": "recycling:beverage_cartons=yes" + }, + { + "question": { + "en": "Recycling of cans", + "nl": "Recycling van blikken" + }, + "osmTags": "recycling:cans=yes" + }, + { + "question": { + "en": "Recycling of clothes", + "nl": "Recycling van kleding" + }, + "osmTags": "recycling:clothes=yes" + }, + { + "question": { + "en": "Recycling of cooking oil", + "nl": "Recycling van frituurvet" + }, + "osmTags": "recycling:cooking_oil=yes" + }, + { + "question": { + "en": "Recycling of engine oil", + "nl": "Recycling van motorolie" + }, + "osmTags": "recycling:engine_oil=yes" + }, + { + "question": { + "en": "Recycling of green waste", + "nl": "Recycling van groen afval" + }, + "osmTags": "recycling:green_waste=yes" + }, + { + "question": { + "en": "Recycling of glass bottles", + "nl": "Recycling van glazen flessen" + }, + "osmTags": "recycling:glass_bottles=yes" + }, + { + "question": { + "en": "Recycling of glass", + "nl": "Recycling van glas" + }, + "osmTags": "recycling:glass=yes" + }, + { + "question": { + "en": "Recycling of newspapers", + "nl": "Recycling van kranten" + }, + "osmTags": "recycling:newspaper=yes" + }, + { + "question": { + "en": "Recycling of paper", + "nl": "Recycling van papier" + }, + "osmTags": "recycling:paper=yes" + }, + { + "question": { + "en": "Recycling of plastic bottles", + "nl": "Recycling van plastic flessen" + }, + "osmTags": "recycling:plastic_bottles=yes" + }, + { + "question": { + "en": "Recycling of plastic packaging", + "nl": "Recycling van plastic verpakking" + }, + "osmTags": "recycling:plastic_packaging=yes" + }, + { + "question": { + "en": "Recycling of plastic", + "nl": "Recycling van plastic" + }, + "osmTags": "recycling:plastic=yes" + }, + { + "question": { + "en": "Recycling of scrap metal", + "nl": "Recycling van oud metaal" + }, + "osmTags": "recycling:scrap_metal=yes" + }, + { + "question": { + "en": "Recycling of small electrical appliances", + "nl": "Recycling van kleine elektrische apparaten" + }, + "osmTags": "recycling:small_electrical_appliances=yes" + } + + ] + } + ] } \ No newline at end of file diff --git a/assets/layers/recycling/scrap_metal.svg b/assets/layers/recycling/scrap_metal.svg new file mode 100644 index 000000000..9ff4dfeeb --- /dev/null +++ b/assets/layers/recycling/scrap_metal.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/assets/layers/recycling/shoes.svg b/assets/layers/recycling/shoes.svg new file mode 100644 index 000000000..0a5bd834e --- /dev/null +++ b/assets/layers/recycling/shoes.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/layers/recycling/small_electrical_appliances.svg b/assets/layers/recycling/small_electrical_appliances.svg new file mode 100644 index 000000000..b5529c91f --- /dev/null +++ b/assets/layers/recycling/small_electrical_appliances.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 775f52839a72b0a55d7fc5be012bcb194f835faa Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Sat, 1 Jan 2022 03:09:08 +0100 Subject: [PATCH 04/26] Added filters to waste_basket layer --- assets/layers/waste_basket/waste_basket.json | 66 ++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/assets/layers/waste_basket/waste_basket.json b/assets/layers/waste_basket/waste_basket.json index 49a365d2b..1ff292be5 100644 --- a/assets/layers/waste_basket/waste_basket.json +++ b/assets/layers/waste_basket/waste_basket.json @@ -159,6 +159,72 @@ } } ], + "filter": [ + { + "id": "waste-type", + "options": [ + { + "question": { + "en": "All types", + "nl": "Alle soorten", + "de": "Alle Typen" + } + }, + { + "question": { + "en": "Waste basket for cigarettes", + "nl": "Vuilnisbak voor sigarettenpeuken", + "de": "Mülleimer für Zigaretten" + }, + "osmTags": "waste=cigarettes" + }, + { + "question": { + "en": "Waste basket for drugs", + "nl": "Vuilnisbak voor (vervallen) medicatie en drugs", + "de": "Mülleimer für Drogen" + }, + "osmTags": "waste=drugs" + }, + { + "question": { + "en": "Waste basket for dog excrement", + "nl": "Vuilnisbak voor hondenuitwerpselen", + "de": "Mülleimer für Hundekot" + }, + "osmTags": "waste=dog_excrement" + }, + { + "question": { + "en": "Waste basket for trash", + "nl": "Vuilnisbak voor zwerfvuil", + "de": "Mülleimer für allgemeinen Müll" + }, + "osmTags": "waste=trash" + }, + { + "question": { + "en": "Waste basket for sharps", + "nl": "Vuilnisbak voor injectienaalden en andere scherpe voorwerpen", + "de": "Mülleimer für Nadeln und andere scharfe Gegenstände" + }, + "osmTags": "waste=sharps" + } + ] + }, + { + "id": "waste-vending", + "options": [ + { + "question": { + "en": "Waste basket with dispenser for (dog) excrement bags", + "nl": "Vuilnisbak met verdeler voor hondenpoepzakjes", + "de": "Abfalleimer mit Spender für (Hunde-)Kotbeutel" + } + } + ] + } + ], "deletion": { "softDeletionTags": { "and": [ From 8b0c07f898ba7a582f875534463fe02e8ccb7ab5 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Sat, 1 Jan 2022 14:00:24 +0100 Subject: [PATCH 05/26] Fix filter --- assets/layers/waste_basket/waste_basket.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/layers/waste_basket/waste_basket.json b/assets/layers/waste_basket/waste_basket.json index 1ff292be5..0e3ea89ed 100644 --- a/assets/layers/waste_basket/waste_basket.json +++ b/assets/layers/waste_basket/waste_basket.json @@ -220,7 +220,8 @@ "en": "Waste basket with dispenser for (dog) excrement bags", "nl": "Vuilnisbak met verdeler voor hondenpoepzakjes", "de": "Abfalleimer mit Spender für (Hunde-)Kotbeutel" - } + }, + "osmTags": "vending=dog_excrement_bag" } ] } From fe539d72f9175f747f6460b11e378af77b17fc0d Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Sat, 1 Jan 2022 15:32:33 +0100 Subject: [PATCH 06/26] Add waste disposal layer --- assets/layers/recycling/recycling.json | 18 +- assets/layers/waste_basket/waste_basket.json | 2 +- .../layers/waste_disposal/license_info.json | 12 + .../layers/waste_disposal/waste_disposal.json | 88 +++++++ .../layers/waste_disposal/waste_disposal.svg | 31 +++ assets/themes/waste/waste.json | 3 + langs/layers/de.json | 31 +++ langs/layers/en.json | 244 ++++++++++++++++++ langs/layers/nl.json | 205 +++++++++++++++ langs/themes/en.json | 4 + langs/themes/nl.json | 4 + 11 files changed, 635 insertions(+), 7 deletions(-) create mode 100644 assets/layers/waste_disposal/license_info.json create mode 100644 assets/layers/waste_disposal/waste_disposal.json create mode 100644 assets/layers/waste_disposal/waste_disposal.svg diff --git a/assets/layers/recycling/recycling.json b/assets/layers/recycling/recycling.json index c5b8edbd8..f25a0dce0 100644 --- a/assets/layers/recycling/recycling.json +++ b/assets/layers/recycling/recycling.json @@ -74,10 +74,10 @@ ] }, { - "id": "container-underground", + "id": "container-location", "question": { - "en": "Is this container underground?", - "nl": "Is deze container ondergrond?" + "en": "Where is this container located?", + "nl": "Waar bevindt deze container zich?" }, "condition": "recycling_type=container", "mappings": [ @@ -88,11 +88,18 @@ "nl": "Dit is een ondergrondse container" } }, + { + "if": "location=indoor", + "then": { + "en": "This container is located indoors", + "nl": "Deze container bevindt binnen" + } + }, { "if": "location=", "then": { - "en": "This container is not underground", - "nl": "Deze container is niet ondergronds" + "en": "This container is located outdoors", + "nl": "Deze container is buiten" } } ] @@ -414,7 +421,6 @@ }, "osmTags": "recycling:small_electrical_appliances=yes" } - ] } ] diff --git a/assets/layers/waste_basket/waste_basket.json b/assets/layers/waste_basket/waste_basket.json index 0e3ea89ed..26be51a28 100644 --- a/assets/layers/waste_basket/waste_basket.json +++ b/assets/layers/waste_basket/waste_basket.json @@ -208,7 +208,7 @@ "nl": "Vuilnisbak voor injectienaalden en andere scherpe voorwerpen", "de": "Mülleimer für Nadeln und andere scharfe Gegenstände" }, - "osmTags": "waste=sharps" + "osmTags": "waste=sharps" } ] }, diff --git a/assets/layers/waste_disposal/license_info.json b/assets/layers/waste_disposal/license_info.json new file mode 100644 index 000000000..aeeec767e --- /dev/null +++ b/assets/layers/waste_disposal/license_info.json @@ -0,0 +1,12 @@ +[ + { + "path": "waste_disposal.svg", + "license": "CC0", + "authors": [ + "kocio-pl" + ], + "sources": [ + "https://github.com/gravitystorm/openstreetmap-carto/blob/master/symbols/amenity/waste_disposal.svg" + ] + } +] \ No newline at end of file diff --git a/assets/layers/waste_disposal/waste_disposal.json b/assets/layers/waste_disposal/waste_disposal.json new file mode 100644 index 000000000..5bf4faf8b --- /dev/null +++ b/assets/layers/waste_disposal/waste_disposal.json @@ -0,0 +1,88 @@ +{ + "id": "waste_disposal", + "name": { + "en": "Waste Disposal Bins" + }, + "description": { + "en": "Waste Disposal Bin, medium to large bin for disposal of (household) waste" + }, + "source": { + "osmTags": "amenity=waste_disposal" + }, + "minZoom": 12, + "title": { + "render": { + "en": "Waste Disposal" + } + }, + "mapRendering": [ + { + "location": [ + "point", + "centroid" + ], + "icon": "./assets/layers/waste_disposal/waste_disposal.svg" + } + ], + "presets": [ + { + "title": { + "en": "Waste Disposal Bin" + }, + "tags": [ + "amenity=waste_disposal" + ], + "description": { + "en": "Medium to large bin for disposal of (household) waste" + } + } + ], + "tagRenderings": [ + { + "id": "access", + "render": { + "en": "Access: {access}" + }, + "question": { + "en": "Who can use this waste disposal bin?" + }, + "freeform": { + "key": "access", + "type": "string" + }, + "mappings": [ + { + "if": "access=yes", + "then": { + "en": "This bin can be used by anyone" + } + }, + { + "if": "access=no", + "then": { + "en": "This bin is private" + } + }, + { + "if": "access=residents", + "then": { + "en": "This bin is only for residents" + } + } + ] + } + ], + "filter": [ + { + "id": "public-access", + "options": [ + { + "question": { + "en": "Only public access" + }, + "osmTags": "access=yes" + } + ] + } + ] +} \ No newline at end of file diff --git a/assets/layers/waste_disposal/waste_disposal.svg b/assets/layers/waste_disposal/waste_disposal.svg new file mode 100644 index 000000000..db755349c --- /dev/null +++ b/assets/layers/waste_disposal/waste_disposal.svg @@ -0,0 +1,31 @@ + + + + + + image/svg+xml + + + + + + + + diff --git a/assets/themes/waste/waste.json b/assets/themes/waste/waste.json index 74f481338..0ae398543 100644 --- a/assets/themes/waste/waste.json +++ b/assets/themes/waste/waste.json @@ -27,6 +27,9 @@ }, { "builtin": "recycling" + }, + { + "builtin": "waste_disposal" } ] } \ No newline at end of file diff --git a/langs/layers/de.json b/langs/layers/de.json index dc35e9bcb..7155c02c7 100644 --- a/langs/layers/de.json +++ b/langs/layers/de.json @@ -3092,6 +3092,37 @@ }, "waste_basket": { "description": "Dies ist ein öffentlicher Abfalleimer, in den Sie Ihren Müll entsorgen können.", + "filter": { + "0": { + "options": { + "0": { + "question": "Alle Typen" + }, + "1": { + "question": "Mülleimer für Zigaretten" + }, + "2": { + "question": "Mülleimer für Drogen" + }, + "3": { + "question": "Mülleimer für Hundekot" + }, + "4": { + "question": "Mülleimer für allgemeinen Müll" + }, + "5": { + "question": "Mülleimer für Nadeln und andere scharfe Gegenstände" + } + } + }, + "1": { + "options": { + "0": { + "question": "Abfalleimer mit Spender für (Hunde-)Kotbeutel" + } + } + } + }, "mapRendering": { "0": { "iconSize": { diff --git a/langs/layers/en.json b/langs/layers/en.json index 59d75cc71..c9a347aa7 100644 --- a/langs/layers/en.json +++ b/langs/layers/en.json @@ -3620,6 +3620,180 @@ "render": "Bookcase" } }, + "recycling": { + "description": "A layer with recycling containers and centres", + "filter": { + "0": { + "options": { + "0": { + "question": "Currently open" + } + } + }, + "1": { + "options": { + "0": { + "question": "All recycling types" + }, + "1": { + "question": "Recycling of batteries" + }, + "2": { + "question": "Recycling of beverage cartons" + }, + "3": { + "question": "Recycling of cans" + }, + "4": { + "question": "Recycling of clothes" + }, + "5": { + "question": "Recycling of cooking oil" + }, + "6": { + "question": "Recycling of engine oil" + }, + "7": { + "question": "Recycling of green waste" + }, + "8": { + "question": "Recycling of glass bottles" + }, + "9": { + "question": "Recycling of glass" + }, + "10": { + "question": "Recycling of newspapers" + }, + "11": { + "question": "Recycling of paper" + }, + "12": { + "question": "Recycling of plastic bottles" + }, + "13": { + "question": "Recycling of plastic packaging" + }, + "14": { + "question": "Recycling of plastic" + }, + "15": { + "question": "Recycling of scrap metal" + }, + "16": { + "question": "Recycling of small electrical appliances" + } + } + } + }, + "name": "Recycling", + "presets": { + "0": { + "title": "recycling container" + }, + "1": { + "title": "recycling centre" + } + }, + "tagRenderings": { + "container-location": { + "mappings": { + "0": { + "then": "This is an underground container" + }, + "1": { + "then": "This container is located indoors" + }, + "2": { + "then": "This container is located outdoors" + } + }, + "question": "Where is this container located?" + }, + "opening_hours": { + "mappings": { + "0": { + "then": "24/7" + } + }, + "question": "What are the opening hours of this recycling facility?" + }, + "operator": { + "question": "What company operates this recycling facility?", + "render": "This recycling facility is operated by {operator}" + }, + "recycling-accepts": { + "mappings": { + "0": { + "then": "
Batteries can be recycled here
" + }, + "1": { + "then": "
Beverage cartons can be recycled here
" + }, + "2": { + "then": "
Cans can be recycled here
" + }, + "3": { + "then": "
Clothes can be recycled here
" + }, + "4": { + "then": "
Cooking oil can be recycled here
" + }, + "5": { + "then": "
Engine oil can be recycled here
" + }, + "6": { + "then": "
Green waste can be recycled here
" + }, + "7": { + "then": "
Glass bottles can be recycled here
" + }, + "8": { + "then": "
Glass can be recycled here
" + }, + "9": { + "then": "
Newspapers can be recycled here
" + }, + "10": { + "then": "
Paper can be recycled here
" + }, + "11": { + "then": "
Plastic bottles can be recycled here
" + }, + "12": { + "then": "
Plastic packaging can be recycled here
" + }, + "13": { + "then": "
Plastic can be recycled here
" + }, + "14": { + "then": "
Scrap metal can be recycled here
" + }, + "15": { + "then": "
Shoes can be recycled here
" + }, + "16": { + "then": "
Small electrical appliances can be recycled here
" + } + }, + "question": "What can be recycled here?" + }, + "recycling-type": { + "mappings": { + "0": { + "then": "This is a recycling container" + }, + "1": { + "then": "This is a recycling centre" + } + }, + "question": "What type of recycling is this?" + } + }, + "title": { + "render": "Recycling facility" + } + }, "shops": { "description": "A shop", "name": "Shop", @@ -4462,6 +4636,37 @@ }, "waste_basket": { "description": "This is a public waste basket, thrash can, where you can throw away your thrash.", + "filter": { + "0": { + "options": { + "0": { + "question": "All types" + }, + "1": { + "question": "Waste basket for cigarettes" + }, + "2": { + "question": "Waste basket for drugs" + }, + "3": { + "question": "Waste basket for dog excrement" + }, + "4": { + "question": "Waste basket for trash" + }, + "5": { + "question": "Waste basket for sharps" + } + } + }, + "1": { + "options": { + "0": { + "question": "Waste basket with dispenser for (dog) excrement bags" + } + } + } + }, "mapRendering": { "0": { "iconSize": { @@ -4522,6 +4727,45 @@ "render": "Waste Basket" } }, + "waste_disposal": { + "description": "Waste Disposal Bin, medium to large bin for disposal of (household) waste", + "filter": { + "0": { + "options": { + "0": { + "question": "Only public access" + } + } + } + }, + "name": "Waste Disposal Bins", + "presets": { + "0": { + "description": "Medium to large bin for disposal of (household) waste", + "title": "Waste Disposal Bin" + } + }, + "tagRenderings": { + "access": { + "mappings": { + "0": { + "then": "This bin can be used by anyone" + }, + "1": { + "then": "This bin is private" + }, + "2": { + "then": "This bin is only for residents" + } + }, + "question": "Who can use this waste disposal bin?", + "render": "Access: {access}" + } + }, + "title": { + "render": "Waste Disposal" + } + }, "watermill": { "name": "Watermill" } diff --git a/langs/layers/nl.json b/langs/layers/nl.json index 03a8e7a83..50ea195a9 100644 --- a/langs/layers/nl.json +++ b/langs/layers/nl.json @@ -3606,6 +3606,180 @@ "render": "Boekenruilkast" } }, + "recycling": { + "description": "Een laag met recyclagingcontainers en -centrums", + "filter": { + "0": { + "options": { + "0": { + "question": "Op dit moment open" + } + } + }, + "1": { + "options": { + "0": { + "question": "Alle recyclingtypes" + }, + "1": { + "question": "Recycling van batterijen" + }, + "2": { + "question": "Recycling van drankpakken" + }, + "3": { + "question": "Recycling van blikken" + }, + "4": { + "question": "Recycling van kleding" + }, + "5": { + "question": "Recycling van frituurvet" + }, + "6": { + "question": "Recycling van motorolie" + }, + "7": { + "question": "Recycling van groen afval" + }, + "8": { + "question": "Recycling van glazen flessen" + }, + "9": { + "question": "Recycling van glas" + }, + "10": { + "question": "Recycling van kranten" + }, + "11": { + "question": "Recycling van papier" + }, + "12": { + "question": "Recycling van plastic flessen" + }, + "13": { + "question": "Recycling van plastic verpakking" + }, + "14": { + "question": "Recycling van plastic" + }, + "15": { + "question": "Recycling van oud metaal" + }, + "16": { + "question": "Recycling van kleine elektrische apparaten" + } + } + } + }, + "name": "Recycling", + "presets": { + "0": { + "title": "recycling container" + }, + "1": { + "title": "recycling centre" + } + }, + "tagRenderings": { + "container-location": { + "mappings": { + "0": { + "then": "Dit is een ondergrondse container" + }, + "1": { + "then": "Deze container bevindt binnen" + }, + "2": { + "then": "Deze container is buiten" + } + }, + "question": "Waar bevindt deze container zich?" + }, + "opening_hours": { + "mappings": { + "0": { + "then": "24/7" + } + }, + "question": "Wat zijn de openingstijden van deze recyclingfaciliteit?" + }, + "operator": { + "question": "Wat is de beheerder van deze recyclingfaciliteit?", + "render": "Deze recyclingfaciliteit wordt beheerd door {operator}" + }, + "recycling-accepts": { + "mappings": { + "0": { + "then": "
Batterijen kunnen hier gerecycled worden
" + }, + "1": { + "then": "
Drankpakken kunnen hier gerecycled worden
" + }, + "2": { + "then": "
Blikken kunnen hier gerecycled worden
" + }, + "3": { + "then": "
Kleren kunnen hier gerecycled worden
" + }, + "4": { + "then": "
Frituurvet kan hier gerecycled worden
" + }, + "5": { + "then": "
Motorolie kan hier gerecycled worden
" + }, + "6": { + "then": "
Groen afval kan hier gerecycled worden
" + }, + "7": { + "then": "
Glazen flessen kunnen hier gerecycled worden
" + }, + "8": { + "then": "
Glas kan hier gerecycled worden
" + }, + "9": { + "then": "
Kranten kunnen hier gerecycled worden
" + }, + "10": { + "then": "
Papier kan hier gerecycled worden
" + }, + "11": { + "then": "
Plastic flessen kunnen hier gerecycled worden
" + }, + "12": { + "then": "
Plastic verpakking kan hier gerecycled worden
" + }, + "13": { + "then": "
Plastic kan hier gerecycled worden
" + }, + "14": { + "then": "
Oud metaal kan hier gerecycled worden
" + }, + "15": { + "then": "
Schoenen kunnen hier gerecycled worden
" + }, + "16": { + "then": "
Kleine elektronische apparaten kunnen hier gerecycled worden
" + } + }, + "question": "Wat kan hier gerecycled worden?" + }, + "recycling-type": { + "mappings": { + "0": { + "then": "Dit is een recyclingcontainer" + }, + "1": { + "then": "Dit is een recyclingcentrum" + } + }, + "question": "Wat voor soort recycling is dit?" + } + }, + "title": { + "render": "Recyclingfaciliteit" + } + }, "shops": { "description": "Een winkel", "name": "Winkel", @@ -4512,6 +4686,37 @@ }, "waste_basket": { "description": "Dit is een publieke vuilnisbak waar je je afval kan weggooien.", + "filter": { + "0": { + "options": { + "0": { + "question": "Alle soorten" + }, + "1": { + "question": "Vuilnisbak voor sigarettenpeuken" + }, + "2": { + "question": "Vuilnisbak voor (vervallen) medicatie en drugs" + }, + "3": { + "question": "Vuilnisbak voor hondenuitwerpselen" + }, + "4": { + "question": "Vuilnisbak voor zwerfvuil" + }, + "5": { + "question": "Vuilnisbak voor injectienaalden en andere scherpe voorwerpen" + } + } + }, + "1": { + "options": { + "0": { + "question": "Vuilnisbak met verdeler voor hondenpoepzakjes" + } + } + } + }, "mapRendering": { "0": { "iconSize": { diff --git a/langs/themes/en.json b/langs/themes/en.json index cd69694b4..54d9eadd7 100644 --- a/langs/themes/en.json +++ b/langs/themes/en.json @@ -1264,6 +1264,10 @@ }, "title": "UK Addresses" }, + "waste": { + "description": "Map showing waste baskets and recycling facilities.", + "title": "Waste" + }, "waste_basket": { "description": "On this map, you'll find waste baskets near you. If a waste basket is missing on this map, you can add it yourself", "shortDescription": "A map with waste baskets", diff --git a/langs/themes/nl.json b/langs/themes/nl.json index 78f9277d0..5a12cc039 100644 --- a/langs/themes/nl.json +++ b/langs/themes/nl.json @@ -1057,6 +1057,10 @@ } } }, + "waste": { + "description": "Kaart met afvalbakken en recyclingfaciliteiten.", + "title": "Afval" + }, "waste_basket": { "description": "Op deze kaart vind je vuilnisbakken waar je afval in kan smijten. Ontbreekt er een vuilnisbak? Dan kan je die zelf toevoegen", "shortDescription": "Een kaart met vuilnisbakken", From 1acf72cc704b73b2f01d5c7b8278c88cb1b829b1 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Sat, 1 Jan 2022 16:01:33 +0100 Subject: [PATCH 07/26] Fix typo --- assets/layers/recycling/recycling.json | 2 +- langs/layers/nl.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/layers/recycling/recycling.json b/assets/layers/recycling/recycling.json index f25a0dce0..1bebe85be 100644 --- a/assets/layers/recycling/recycling.json +++ b/assets/layers/recycling/recycling.json @@ -92,7 +92,7 @@ "if": "location=indoor", "then": { "en": "This container is located indoors", - "nl": "Deze container bevindt binnen" + "nl": "Deze container bevindt zich binnen" } }, { diff --git a/langs/layers/nl.json b/langs/layers/nl.json index 50ea195a9..9138f969a 100644 --- a/langs/layers/nl.json +++ b/langs/layers/nl.json @@ -3688,7 +3688,7 @@ "then": "Dit is een ondergrondse container" }, "1": { - "then": "Deze container bevindt binnen" + "then": "Deze container bevindt zich binnen" }, "2": { "then": "Deze container is buiten" From abb1e39612cc154df067f0e8d0620573ac1cd60e Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Sun, 2 Jan 2022 20:54:00 +0100 Subject: [PATCH 08/26] Added names and iconBadges --- assets/layers/recycling/recycling.json | 92 +++++++++++++++++++++++++- langs/layers/en.json | 8 +++ langs/layers/nl.json | 8 +++ 3 files changed, 105 insertions(+), 3 deletions(-) diff --git a/assets/layers/recycling/recycling.json b/assets/layers/recycling/recycling.json index 1bebe85be..58e1d28fd 100644 --- a/assets/layers/recycling/recycling.json +++ b/assets/layers/recycling/recycling.json @@ -16,7 +16,23 @@ "render": { "en": "Recycling facility", "nl": "Recyclingfaciliteit" - } + }, + "mappings": [ + { + "if": "recycling_type=centre", + "then": { + "en": "Recycling centre", + "nl": "Recyclingcentrum" + } + }, + { + "if": "recycling_type=container", + "then": { + "en": "Recycling container", + "nl": "Recyclingcontainer" + } + } + ] }, "mapRendering": [ { @@ -24,7 +40,77 @@ "point", "centroid" ], - "icon": "./assets/layers/recycling/recycling-14.svg" + "icon": "./assets/layers/recycling/recycling-14.svg", + "iconBadges": [ + { + "if": "recycling:batteries=yes", + "then": "circle:#FFFFFF;./assets/layers/recycling/batteries.svg" + }, + { + "if": "recycling:beverage_cartons=yes", + "then": "circle:#FFFFFF;./assets/layers/recycling/beverage_cartons.svg" + }, + { + "if": "recycling:cans=yes", + "then": "circle:#FFFFFF;./assets/layers/recycling/cans.svg" + }, + { + "if": "recycling:clothes=yes", + "then": "circle:#FFFFFF;./assets/layers/recycling/clothes.svg" + }, + { + "if": "recycling:cooking_oil=yes", + "then": "circle:#FFFFFF;./assets/layers/recycling/cooking_oil.svg" + }, + { + "if": "recycling:engine_oil=yes", + "then": "circle:#FFFFFF;./assets/layers/recycling/engine_oil.svg" + }, + { + "if": "recycling:glass=yes", + "then": "circle:#FFFFFF;./assets/layers/recycling/glass.svg" + }, + { + "if": "recycling:glass_bottles=yes", + "then": "circle:#FFFFFF;./assets/layers/recycling/glass_bottles.svg" + }, + { + "if": "recycling:green_waste=yes", + "then": "circle:#FFFFFF;./assets/layers/recycling/garden_waste.svg" + }, + { + "if": "recycling:newspaper=yes", + "then": "circle:#FFFFFF;./assets/layers/recycling/newspaper.svg" + }, + { + "if": "recycling:paper=yes", + "then": "circle:#FFFFFF;./assets/layers/recycling/paper.svg" + }, + { + "if": "recycling:plastic_bottles=yes", + "then": "circle:#FFFFFF;./assets/layers/recycling/plastic_bottles.svg" + }, + { + "if": "recycling:plastic_packaging=yes", + "then": "circle:#FFFFFF;./assets/layers/recycling/plastic_packaging.svg" + }, + { + "if": "recycling:plastic=yes", + "then": "circle:#FFFFFF;./assets/layers/recycling/plastic.svg" + }, + { + "if": "recycling:scrap_metal=yes", + "then": "circle:#FFFFFF;./assets/layers/recycling/scrap_metal.svg" + }, + { + "if": "recyling:shoes=yes", + "then": "circle:#FFFFFF;./assets/layers/recycling/shoes.svg" + }, + { + "if": "recycling:small_electrical_appliances=yes", + "then": "circle:#FFFFFF;./assets/layers/recycling/small_electrical_appliances.svg" + } + ] } ], "presets": [ @@ -217,7 +303,7 @@ } }, { - "if": "recylcing:plastic=yes", + "if": "recycling:plastic=yes", "ifnot": "recycling:plastic=", "then": { "en": "
Plastic can be recycled here
", diff --git a/langs/layers/en.json b/langs/layers/en.json index c9a347aa7..dec19cc04 100644 --- a/langs/layers/en.json +++ b/langs/layers/en.json @@ -3791,6 +3791,14 @@ } }, "title": { + "mappings": { + "0": { + "then": "Recycling centre" + }, + "1": { + "then": "Recycling container" + } + }, "render": "Recycling facility" } }, diff --git a/langs/layers/nl.json b/langs/layers/nl.json index 9138f969a..eded2ac50 100644 --- a/langs/layers/nl.json +++ b/langs/layers/nl.json @@ -3777,6 +3777,14 @@ } }, "title": { + "mappings": { + "0": { + "then": "Recyclingcentrum" + }, + "1": { + "then": "Recyclingcontainer" + } + }, "render": "Recyclingfaciliteit" } }, From b59f3ca5c846b8d55e94eebb1bd615c968e5101a Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Sun, 9 Jan 2022 14:28:14 +0100 Subject: [PATCH 09/26] Added waste to recycling theme --- assets/layers/recycling/recycling.json | 19 +++++++++++++++++++ langs/layers/en.json | 6 ++++++ langs/layers/nl.json | 6 ++++++ 3 files changed, 31 insertions(+) diff --git a/assets/layers/recycling/recycling.json b/assets/layers/recycling/recycling.json index 58e1d28fd..e4d640f21 100644 --- a/assets/layers/recycling/recycling.json +++ b/assets/layers/recycling/recycling.json @@ -109,6 +109,10 @@ { "if": "recycling:small_electrical_appliances=yes", "then": "circle:#FFFFFF;./assets/layers/recycling/small_electrical_appliances.svg" + }, + { + "if": "recycling:waste=yes", + "then": "circle:#FFFFFF;./assets/layers/waste_disposal/waste_disposal.svg" } ] } @@ -333,6 +337,14 @@ "en": "
Small electrical appliances can be recycled here
", "nl": "
Kleine elektronische apparaten kunnen hier gerecycled worden
" } + }, + { + "if": "recycling:waste=yes", + "ifnot": "recycling:waste=", + "then": { + "en": "
Residual waste can be recycled here
", + "nl": "
Restafval kan hier gerecycled worden
" + } } ] }, @@ -506,6 +518,13 @@ "nl": "Recycling van kleine elektrische apparaten" }, "osmTags": "recycling:small_electrical_appliances=yes" + }, + { + "question": { + "en": "Recycling of residual waste", + "nl": "Recycling van restafval" + }, + "osmTags": "recycling:waste=yes" } ] } diff --git a/langs/layers/en.json b/langs/layers/en.json index f6f2c8e2d..a08fbbb59 100644 --- a/langs/layers/en.json +++ b/langs/layers/en.json @@ -3692,6 +3692,9 @@ }, "16": { "question": "Recycling of small electrical appliances" + }, + "17": { + "question": "Recycling of residual waste" } } } @@ -3784,6 +3787,9 @@ }, "16": { "then": "
Small electrical appliances can be recycled here
" + }, + "17": { + "then": "
Residual waste can be recycled here
" } }, "question": "What can be recycled here?" diff --git a/langs/layers/nl.json b/langs/layers/nl.json index b9d8c781b..31967af2d 100644 --- a/langs/layers/nl.json +++ b/langs/layers/nl.json @@ -3675,6 +3675,9 @@ }, "16": { "question": "Recycling van kleine elektrische apparaten" + }, + "17": { + "question": "Recycling van restafval" } } } @@ -3767,6 +3770,9 @@ }, "16": { "then": "
Kleine elektronische apparaten kunnen hier gerecycled worden
" + }, + "17": { + "then": "
Restafval kan hier gerecycled worden
" } }, "question": "Wat kan hier gerecycled worden?" From b5bfd6558b50c99319b498cb119d444e4229cd81 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Sun, 9 Jan 2022 17:39:51 +0100 Subject: [PATCH 10/26] Add waste_assen, add location for disposal --- .../layers/waste_disposal/waste_disposal.json | 30 +++++ .../street_lighting_assen.json | 2 +- assets/themes/waste/waste.json | 2 +- assets/themes/waste/waste_assen.json | 113 ++++++++++++++++++ langs/layers/en.json | 14 +++ langs/layers/nl.json | 18 +++ langs/themes/nl.json | 4 + 7 files changed, 181 insertions(+), 2 deletions(-) create mode 100644 assets/themes/waste/waste_assen.json diff --git a/assets/layers/waste_disposal/waste_disposal.json b/assets/layers/waste_disposal/waste_disposal.json index 5bf4faf8b..b74479672 100644 --- a/assets/layers/waste_disposal/waste_disposal.json +++ b/assets/layers/waste_disposal/waste_disposal.json @@ -70,6 +70,36 @@ } } ] + }, + { + "id": "disposal-location", + "question": { + "en": "Where is this container located?", + "nl": "Waar bevindt deze container zich?" + }, + "mappings": [ + { + "if": "location=underground", + "then": { + "en": "This is an underground container", + "nl": "Dit is een ondergrondse container" + } + }, + { + "if": "location=indoor", + "then": { + "en": "This container is located indoors", + "nl": "Deze container bevindt zich binnen" + } + }, + { + "if": "location=", + "then": { + "en": "This container is located outdoors", + "nl": "Deze container is buiten" + } + } + ] } ], "filter": [ diff --git a/assets/themes/street_lighting/street_lighting_assen.json b/assets/themes/street_lighting/street_lighting_assen.json index fe515dba0..49de1e8af 100644 --- a/assets/themes/street_lighting/street_lighting_assen.json +++ b/assets/themes/street_lighting/street_lighting_assen.json @@ -30,7 +30,7 @@ }, "calculatedTags": [ "_closest_osm_street_lamp=feat.closest('street_lamps')?.properties?.id", - "_closest_osm_street_lamp_distance=feat.distanceTo(feat.properties._closest_osm_street_lamp) * 1000", + "_closest_osm_street_lamp_distance=feat.distanceTo(feat.properties._closest_osm_street_lamp)", "_has_closeby_feature=Number(feat.properties._closest_osm_street_lamp_distance) < 5 ? 'yes' : 'no'" ], "title": "Straatlantaarn in dataset", diff --git a/assets/themes/waste/waste.json b/assets/themes/waste/waste.json index 0ae398543..61d65712c 100644 --- a/assets/themes/waste/waste.json +++ b/assets/themes/waste/waste.json @@ -1,7 +1,7 @@ { "id": "waste", "maintainer": "", - "version": "2021-12-31", + "version": "2022-01-19", "language": [ "en", "nl" diff --git a/assets/themes/waste/waste_assen.json b/assets/themes/waste/waste_assen.json new file mode 100644 index 000000000..fadb370fd --- /dev/null +++ b/assets/themes/waste/waste_assen.json @@ -0,0 +1,113 @@ +{ + "id": "waste_assen", + "maintainer": "Robin van der Linde", + "version": "2022-01-09", + "language": [ + "en", + "nl" + ], + "title": { + "nl": "Afval - Assen" + }, + "description": { + "nl": "Kaart met afvalbakken en recyclingfaciliteiten + een dataset voor Assen." + }, + "icon": "./assets/layers/recycling/recycling-14.svg", + "startZoom": 19, + "startLat": 53.24865, + "startLon": 6.60075, + "layers": [ + { + "builtin": "waste_basket", + "override": { + "minzoom": 12 + } + }, + { + "id": "waste_basket_assen", + "name": "Dataset Afvalbakken Assen", + "source": { + "osmTags": "OBJECTID~*", + "geoJson": "https://opendata.arcgis.com/datasets/5b6953ac5a9d4616a7dc75ab0beeac2f_0.geojson", + "isOsmCache": false + }, + "calculatedTags": [ + "_closest_osm_waste_basket=feat.closest('waste_basket')?.properties?.id", + "_closest_osm_waste_basket_distance=feat.distanceTo(feat.properties._closest_osm_waste_basket)", + "_has_closeby_feature=Number(feat.properties._closest_osm_waste_basket_distance) < 10 ? 'yes' : 'no'" + ], + "title": "Afvalbak in dataset", + "mapRendering": [ + { + "location": [ + "point", + "centroid" + ], + "icon": { + "render": "circle:red", + "mappings": [ + { + "if": "_has_closeby_feature=yes", + "then": "circle:#008000aa" + } + ] + }, + "iconSize": "20,20,center" + } + ], + "tagRenderings": [ + "all_tags" + ] + }, + { + "builtin": "recycling" + }, + { + "id": "recycling_assen", + "name": "Dataset Recyclingcontainers Assen", + "source": { + "osmTags": "OBJECTID~*", + "geoJson": "https://opendata.arcgis.com/datasets/edb893998e27461b8ed82aad9854d27d_0.geojson", + "isOsmCache": false + }, + "calculatedTags": [ + "_closest_osm_recycling=feat.closest('recycling')?.properties?.id", + "_closest_osm_waste_disposal=feat.closest('waste_disposal')?.properties?.id", + "_closest_osm_recycling_distance=feat.distanceTo(feat.properties._closest_osm_recycling)", + "_closest_osm_waste_disposal_distance=feat.distanceTo(feat.properties._closest_osm_waste_disposal)", + "_has_closeby_recycling=Number(feat.properties._closest_osm_recycling_distance) < 10 ? 'yes' : 'no'", + "_has_closeby_waste_disposal=Number(feat.properties._closest_osm_waste_disposal_distance) < 10 ? 'yes' : 'no'" + ], + "title": "Recyclingcontainer in dataset", + "mapRendering": [ + { + "location": [ + "point", + "centroid" + ], + "icon": { + "render": "circle:red", + "mappings": [ + { + "if": "_has_closeby_recycling=yes", + "then": "circle:#008000aa" + }, + { + "if": "_has_closeby_waste_disposal=yes", + "then": "circle:#008000aa" + } + ] + }, + "iconSize": "20,20,center" + } + ], + "tagRenderings": [ + "all_tags" + ] + }, + { + "builtin": "waste_disposal" + } + ], + "hideFromOverview": true +} \ No newline at end of file diff --git a/langs/layers/en.json b/langs/layers/en.json index a08fbbb59..4fa8c01ef 100644 --- a/langs/layers/en.json +++ b/langs/layers/en.json @@ -4784,6 +4784,20 @@ }, "question": "Who can use this waste disposal bin?", "render": "Access: {access}" + }, + "disposal-location": { + "mappings": { + "0": { + "then": "This is an underground container" + }, + "1": { + "then": "This container is located indoors" + }, + "2": { + "then": "This container is located outdoors" + } + }, + "question": "Where is this container located?" } }, "title": { diff --git a/langs/layers/nl.json b/langs/layers/nl.json index 31967af2d..805df00d8 100644 --- a/langs/layers/nl.json +++ b/langs/layers/nl.json @@ -4798,6 +4798,24 @@ "render": "Vuilnisbak" } }, + "waste_disposal": { + "tagRenderings": { + "disposal-location": { + "mappings": { + "0": { + "then": "Dit is een ondergrondse container" + }, + "1": { + "then": "Deze container bevindt zich binnen" + }, + "2": { + "then": "Deze container is buiten" + } + }, + "question": "Waar bevindt deze container zich?" + } + } + }, "watermill": { "description": "Watermolens", "name": "Watermolens", diff --git a/langs/themes/nl.json b/langs/themes/nl.json index 5a12cc039..80cbc37c9 100644 --- a/langs/themes/nl.json +++ b/langs/themes/nl.json @@ -1061,6 +1061,10 @@ "description": "Kaart met afvalbakken en recyclingfaciliteiten.", "title": "Afval" }, + "waste_assen": { + "description": "Kaart met afvalbakken en recyclingfaciliteiten + een dataset voor Assen.", + "title": "Afval - Assen" + }, "waste_basket": { "description": "Op deze kaart vind je vuilnisbakken waar je afval in kan smijten. Ontbreekt er een vuilnisbak? Dan kan je die zelf toevoegen", "shortDescription": "Een kaart met vuilnisbakken", From 9a85fd96e194894d5a57861e39201adaff21baff Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Fri, 21 Jan 2022 02:39:06 +0100 Subject: [PATCH 11/26] Remove unneeded builtin invocation --- assets/themes/waste/waste.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/assets/themes/waste/waste.json b/assets/themes/waste/waste.json index 61d65712c..6ca4ccbc3 100644 --- a/assets/themes/waste/waste.json +++ b/assets/themes/waste/waste.json @@ -25,11 +25,7 @@ "minzoom": 12 } }, - { - "builtin": "recycling" - }, - { - "builtin": "waste_disposal" - } + "recycling", + "waste_disposal" ] } \ No newline at end of file From c85cecfdb586e91f536cd03089b35232bc35fe8e Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Fri, 21 Jan 2022 02:47:23 +0100 Subject: [PATCH 12/26] Remove unnecessary builtin --- assets/themes/waste/waste_assen.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/assets/themes/waste/waste_assen.json b/assets/themes/waste/waste_assen.json index fadb370fd..810c64a31 100644 --- a/assets/themes/waste/waste_assen.json +++ b/assets/themes/waste/waste_assen.json @@ -59,9 +59,7 @@ "all_tags" ] }, - { - "builtin": "recycling" - }, + "recycling", { "id": "recycling_assen", "name": "Dataset Recyclingcontainers Assen", @@ -105,9 +103,7 @@ "all_tags" ] }, - { - "builtin": "waste_disposal" - } + "waste_disposal" ], "hideFromOverview": true } \ No newline at end of file From 010bd7cdc1cb6cbef4de3fab9ca356b24aca79fa Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Thu, 17 Feb 2022 11:03:11 +0100 Subject: [PATCH 13/26] Fix filters, add plastic --- assets/layers/waste_basket/waste_basket.json | 26 +++- .../mapcomplete-changes.json | 8 ++ langs/layers/de.json | 6 + langs/layers/en.json | 121 ++++++++++++++++++ langs/layers/nl.json | 7 + langs/themes/en.json | 4 + langs/themes/nl.json | 8 ++ 7 files changed, 175 insertions(+), 5 deletions(-) diff --git a/assets/layers/waste_basket/waste_basket.json b/assets/layers/waste_basket/waste_basket.json index 26be51a28..9df55c18b 100644 --- a/assets/layers/waste_basket/waste_basket.json +++ b/assets/layers/waste_basket/waste_basket.json @@ -86,6 +86,14 @@ "nl": "Een vuilnisbak voor injectienaalden en andere scherpe voorwerpen", "de": "Ein Abfalleimer für Nadeln und andere scharfe Gegenstände" } + }, + { + "if": "waste=plastic", + "then": { + "en": "A waste basket for plastic", + "nl": "Een vuilnisbak voor plastic", + "de": "Ein Abfalleimer für Plastik" + } } ] }, @@ -176,7 +184,7 @@ "nl": "Vuilnisbak voor sigarettenpeuken", "de": "Mülleimer für Zigaretten" }, - "osmTags": "waste=cigarettes" + "osmTags": "waste~.*cigarettes.*" }, { "question": { @@ -184,7 +192,7 @@ "nl": "Vuilnisbak voor (vervallen) medicatie en drugs", "de": "Mülleimer für Drogen" }, - "osmTags": "waste=drugs" + "osmTags": "waste~.*drugs.*" }, { "question": { @@ -192,7 +200,7 @@ "nl": "Vuilnisbak voor hondenuitwerpselen", "de": "Mülleimer für Hundekot" }, - "osmTags": "waste=dog_excrement" + "osmTags": "waste~.*dog_excrement.*" }, { "question": { @@ -200,7 +208,7 @@ "nl": "Vuilnisbak voor zwerfvuil", "de": "Mülleimer für allgemeinen Müll" }, - "osmTags": "waste=trash" + "osmTags": "waste~.*trash.*" }, { "question": { @@ -208,7 +216,15 @@ "nl": "Vuilnisbak voor injectienaalden en andere scherpe voorwerpen", "de": "Mülleimer für Nadeln und andere scharfe Gegenstände" }, - "osmTags": "waste=sharps" + "osmTags": "waste~.*sharps.*" + }, + { + "question": { + "en": "Waste basket for plastic", + "nl": "Vuilnisbak voor plastic", + "de": "Mülleimer für Plastik" + }, + "osmTags": "waste~.*plastic.*" } ] }, diff --git a/assets/themes/mapcomplete-changes/mapcomplete-changes.json b/assets/themes/mapcomplete-changes/mapcomplete-changes.json index d0108bdbf..8653e1842 100644 --- a/assets/themes/mapcomplete-changes/mapcomplete-changes.json +++ b/assets/themes/mapcomplete-changes/mapcomplete-changes.json @@ -299,6 +299,14 @@ "if": "theme=uk_addresses", "then": "./assets/themes/uk_addresses/housenumber_unknown.svg" }, + { + "if": "theme=waste", + "then": "./assets/layers/recycling/recycling-14.svg" + }, + { + "if": "theme=waste_assen", + "then": "./assets/layers/recycling/recycling-14.svg" + }, { "if": "theme=waste_basket", "then": "./assets/themes/waste_basket/waste_basket.svg" diff --git a/langs/layers/de.json b/langs/layers/de.json index ae8fdc2ce..f865c9cf1 100644 --- a/langs/layers/de.json +++ b/langs/layers/de.json @@ -3214,6 +3214,9 @@ }, "5": { "question": "Mülleimer für Nadeln und andere scharfe Gegenstände" + }, + "6": { + "question": "Mülleimer für Plastik" } } }, @@ -3276,6 +3279,9 @@ }, "5": { "then": "Ein Abfalleimer für Nadeln und andere scharfe Gegenstände" + }, + "6": { + "then": "Ein Abfalleimer für Plastik" } }, "question": "Um was für einen Abfalleimer handelt es sich?" diff --git a/langs/layers/en.json b/langs/layers/en.json index fbc713e37..d32c623af 100644 --- a/langs/layers/en.json +++ b/langs/layers/en.json @@ -1123,6 +1123,7 @@ } }, "birdhide": { + "description": "A birdhide", "filter": { "0": { "options": { @@ -1130,7 +1131,84 @@ "question": "Wheelchair accessible" } } + }, + "1": { + "options": { + "0": { + "question": "Only covered birdhides" + } + } } + }, + "name": "Bird watching places", + "presets": { + "0": { + "description": "A covered shelter where one can watch birds comfortably", + "title": "Birdhide" + }, + "1": { + "description": "A screen or wall with openings to watch birds", + "title": "Bird blind" + } + }, + "tagRenderings": { + "bird-hide-shelter-or-wall": { + "mappings": { + "0": { + "then": "Bird blind" + }, + "1": { + "then": "Bird hide" + }, + "2": { + "then": "Bird tower hide" + }, + "3": { + "then": "Bird hide shelter" + } + }, + "question": "Is this a bird blind or a bird watching shelter?" + }, + "bird-hide-wheelchair": { + "mappings": { + "0": { + "then": "There are special provisions for wheelchair users" + }, + "1": { + "then": "A wheelchair can easily use this birdhide" + }, + "2": { + "then": "This birdhide is reachable by wheelchair, but it is not easy" + }, + "3": { + "then": "Not accessible to wheelchair users" + } + }, + "question": "Is this bird hide accessible to wheelchair users?" + }, + "birdhide-operator": { + "mappings": { + "0": { + "then": "Operated by Natuurpunt" + }, + "1": { + "then": "Operated by the Agency for Nature and Forests" + } + }, + "question": "Who operates this birdhide?", + "render": "Operated by {operator}" + } + }, + "title": { + "mappings": { + "1": { + "then": "Bird hide {name}" + }, + "2": { + "then": "Bird blind {name}" + } + }, + "render": "Bird watching place" } }, "cafe_pub": { @@ -3515,6 +3593,35 @@ }, "nature_reserve": { "description": "A nature reserve is an area where nature can take its course", + "filter": { + "0": { + "options": { + "0": { + "question": "Freely accesible" + } + } + }, + "1": { + "options": { + "0": { + "question": "All nature reserves" + }, + "1": { + "question": "Dogs are allowed to roam freely" + }, + "2": { + "question": "Dogs are allowed if they are leashed" + } + } + } + }, + "name": "Nature reserve", + "presets": { + "0": { + "description": "Add a missing nature reserve", + "title": "nature reserve" + } + }, "tagRenderings": { "Access tag": { "mappings": { @@ -3558,6 +3665,10 @@ }, "question": "Are dogs allowed in this nature reserve?" }, + "Editable description": { + "question": "Is there some extra info?", + "render": "Extra info: {description:0}" + }, "Email": { "question": "What email adress can one send to with questions and problems with this nature reserve?
Respect privacy - only fill out a personal email address if this is widely published", "render": "{email}" @@ -3571,6 +3682,9 @@ "question": "What is the name of this area?", "render": "This area is named {name}" }, + "Non-editable description": { + "render": "Extra information: {description}" + }, "Operator tag": { "mappings": { "0": { @@ -3764,6 +3878,7 @@ }, "parking": { "description": "A layer showing car parkings", + "name": "Parking", "presets": { "0": { "title": "car parking" @@ -5088,6 +5203,9 @@ }, "5": { "question": "Waste basket for sharps" + }, + "6": { + "question": "Waste basket for plastic" } } }, @@ -5150,6 +5268,9 @@ }, "5": { "then": "A waste basket for needles and other sharp objects" + }, + "6": { + "then": "A waste basket for plastic" } }, "question": "What kind of waste basket is this?" diff --git a/langs/layers/nl.json b/langs/layers/nl.json index 2c6d1c12d..d9673fce0 100644 --- a/langs/layers/nl.json +++ b/langs/layers/nl.json @@ -3473,6 +3473,7 @@ "question": "Zijn honden toegelaten in dit gebied?" }, "Editable description": { + "question": "Is er extra info die je kwijt wil?", "render": "Extra info: {description:0}" }, "Email": { @@ -4999,6 +5000,9 @@ }, "5": { "question": "Vuilnisbak voor injectienaalden en andere scherpe voorwerpen" + }, + "6": { + "question": "Vuilnisbak voor plastic" } } }, @@ -5061,6 +5065,9 @@ }, "5": { "then": "Een vuilnisbak voor injectienaalden en andere scherpe voorwerpen" + }, + "6": { + "then": "Een vuilnisbak voor plastic" } }, "question": "Wat voor soort vuilnisbak is dit?" diff --git a/langs/themes/en.json b/langs/themes/en.json index ccdc4f080..fb0db2db4 100644 --- a/langs/themes/en.json +++ b/langs/themes/en.json @@ -1286,6 +1286,10 @@ "shortDescription": "Map all the trees", "title": "Trees" }, + "waste": { + "description": "Map showing waste baskets and recycling facilities.", + "title": "Waste" + }, "waste_basket": { "description": "On this map, you'll find waste baskets near you. If a waste basket is missing on this map, you can add it yourself", "shortDescription": "A map with waste baskets", diff --git a/langs/themes/nl.json b/langs/themes/nl.json index 4e77e8d09..e0cd02382 100644 --- a/langs/themes/nl.json +++ b/langs/themes/nl.json @@ -1050,6 +1050,14 @@ "shortDescription": "Breng bomen in kaart", "title": "Bomen" }, + "waste": { + "description": "Kaart met afvalbakken en recyclingfaciliteiten.", + "title": "Afval" + }, + "waste_assen": { + "description": "Kaart met afvalbakken en recyclingfaciliteiten + een dataset voor Assen.", + "title": "Afval - Assen" + }, "waste_basket": { "description": "Op deze kaart vind je vuilnisbakken waar je afval in kan smijten. Ontbreekt er een vuilnisbak? Dan kan je die zelf toevoegen", "shortDescription": "Een kaart met vuilnisbakken", From bb30c353b415f3a4121c5d29efb1bf59fe087f03 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Thu, 17 Feb 2022 13:47:59 +0100 Subject: [PATCH 14/26] Fix typo --- assets/layers/waste_basket/waste_basket.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/layers/waste_basket/waste_basket.json b/assets/layers/waste_basket/waste_basket.json index 9df55c18b..cf59c3f29 100644 --- a/assets/layers/waste_basket/waste_basket.json +++ b/assets/layers/waste_basket/waste_basket.json @@ -145,7 +145,7 @@ "nl": "Deze vuilnisbaak heeft waarschijnlijk geen verdeler voor hondenpoepzakjes", "de": "Dieser Abfalleimer hat keinen Spender für (Hunde-)Kotbeutel" }, - "hideInAnwer": true + "hideInAnswer": true } ] } From 41009abe5deae4b014b22a0e5557aab96d8e58b3 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Thu, 17 Feb 2022 13:52:16 +0100 Subject: [PATCH 15/26] Change icon --- assets/layers/recycling/recycling.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/layers/recycling/recycling.json b/assets/layers/recycling/recycling.json index e4d640f21..13fedf0d9 100644 --- a/assets/layers/recycling/recycling.json +++ b/assets/layers/recycling/recycling.json @@ -40,7 +40,7 @@ "point", "centroid" ], - "icon": "./assets/layers/recycling/recycling-14.svg", + "icon": "circle:white;./assets/layers/recycling/recycling-14.svg", "iconBadges": [ { "if": "recycling:batteries=yes", From 879536c823b4f2ee5d8be44675197c64414524a9 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Thu, 17 Feb 2022 14:34:43 +0100 Subject: [PATCH 16/26] Changed zoom levels, other details --- assets/layers/recycling/recycling.json | 58 ++++++++++++------- .../layers/waste_disposal/waste_disposal.json | 3 +- assets/themes/waste/waste.json | 3 +- langs/layers/en.json | 6 ++ langs/layers/nl.json | 3 + 5 files changed, 49 insertions(+), 24 deletions(-) diff --git a/assets/layers/recycling/recycling.json b/assets/layers/recycling/recycling.json index 13fedf0d9..0e8a1e86b 100644 --- a/assets/layers/recycling/recycling.json +++ b/assets/layers/recycling/recycling.json @@ -75,7 +75,12 @@ "then": "circle:#FFFFFF;./assets/layers/recycling/glass_bottles.svg" }, { - "if": "recycling:green_waste=yes", + "if": { + "or": [ + "recycling:green_waste=yes", + "recycling:organic=yes" + ] + }, "then": "circle:#FFFFFF;./assets/layers/recycling/garden_waste.svg" }, { @@ -259,85 +264,94 @@ } }, { - "if": "recycling:glass_bottles=yes", - "ifnot": "recycling:glass_bottles=", + "if": "recycling:organic=yes", + "ifnot": "recycling:organic=", "then": { "en": "
Glass bottles can be recycled here
", "nl": "
Glazen flessen kunnen hier gerecycled worden
" - } + }, + "hideInAnswer": true }, { - "if": "recycling:glass=yes", - "ifnot": "recycling:glass=", + "if": "recycling:glass_bottles=yes", + "ifnot": "recycling:glass_bottles=", "then": { "en": "
Glass can be recycled here
", "nl": "
Glas kan hier gerecycled worden
" } }, { - "if": "recycling:newspaper=yes", - "ifnot": "recycling:newspaper=", + "if": "recycling:glass=yes", + "ifnot": "recycling:glass=", "then": { "en": "
Newspapers can be recycled here
", "nl": "
Kranten kunnen hier gerecycled worden
" } }, { - "if": "recycling:paper=yes", - "ifnot": "recycling:paper=", + "if": "recycling:newspaper=yes", + "ifnot": "recycling:newspaper=", "then": { "en": "
Paper can be recycled here
", "nl": "
Papier kan hier gerecycled worden
" } }, { - "if": "recycling:plastic_bottles=yes", - "ifnot": "recycling:plastic_bottles=", + "if": "recycling:paper=yes", + "ifnot": "recycling:paper=", "then": { "en": "
Plastic bottles can be recycled here
", "nl": "
Plastic flessen kunnen hier gerecycled worden
" } }, { - "if": "recycling:plastic_packaging=yes", - "ifnot": "recycling:plastic_packaging=", + "if": "recycling:plastic_bottles=yes", + "ifnot": "recycling:plastic_bottles=", "then": { "en": "
Plastic packaging can be recycled here
", "nl": "
Plastic verpakking kan hier gerecycled worden
" } }, { - "if": "recycling:plastic=yes", - "ifnot": "recycling:plastic=", + "if": "recycling:plastic_packaging=yes", + "ifnot": "recycling:plastic_packaging=", "then": { "en": "
Plastic can be recycled here
", "nl": "
Plastic kan hier gerecycled worden
" } }, { - "if": "recycling:scrap_metal=yes", - "ifnot": "recycling:scrap_metal=", + "if": "recycling:plastic=yes", + "ifnot": "recycling:plastic=", "then": { "en": "
Scrap metal can be recycled here
", "nl": "
Oud metaal kan hier gerecycled worden
" } }, { - "if": "recycling:shoes=yes", - "ifnot": "recycling:shoes=", + "if": "recycling:scrap_metal=yes", + "ifnot": "recycling:scrap_metal=", "then": { "en": "
Shoes can be recycled here
", "nl": "
Schoenen kunnen hier gerecycled worden
" } }, { - "if": "recycling:small_electrical_appliances=yes", - "ifnot": "recycling:small_electrical_appliances=", + "if": "recycling:shoes=yes", + "ifnot": "recycling:shoes=", "then": { "en": "
Small electrical appliances can be recycled here
", "nl": "
Kleine elektronische apparaten kunnen hier gerecycled worden
" } }, + { + "if": "recycling:small_electrical_appliances=yes", + "ifnot": "recycling:small_electrical_appliances=", + "then": { + "en": "
Residual waste can be recycled here
", + "nl": "
Restafval kan hier gerecycled worden
" + } + }, { "if": "recycling:waste=yes", "ifnot": "recycling:waste=", diff --git a/assets/layers/waste_disposal/waste_disposal.json b/assets/layers/waste_disposal/waste_disposal.json index b74479672..dc5c2e334 100644 --- a/assets/layers/waste_disposal/waste_disposal.json +++ b/assets/layers/waste_disposal/waste_disposal.json @@ -9,7 +9,8 @@ "source": { "osmTags": "amenity=waste_disposal" }, - "minZoom": 12, + "minzoom": 18, + "minzoomVisible": 18, "title": { "render": { "en": "Waste Disposal" diff --git a/assets/themes/waste/waste.json b/assets/themes/waste/waste.json index 6ca4ccbc3..1998b893a 100644 --- a/assets/themes/waste/waste.json +++ b/assets/themes/waste/waste.json @@ -22,7 +22,8 @@ { "builtin": "waste_basket", "override": { - "minzoom": 12 + "minzoom": 18, + "minzoomVisible": 18 } }, "recycling", diff --git a/langs/layers/en.json b/langs/layers/en.json index d32c623af..fdb214cf1 100644 --- a/langs/layers/en.json +++ b/langs/layers/en.json @@ -4313,6 +4313,9 @@ }, "17": { "then": "
Residual waste can be recycled here
" + }, + "18": { + "then": "
Residual waste can be recycled here
" } }, "question": "What can be recycled here?" @@ -4336,6 +4339,9 @@ }, "1": { "then": "Recycling container" + }, + "2": { + "then": "Waste disposal bin" } }, "render": "Recycling facility" diff --git a/langs/layers/nl.json b/langs/layers/nl.json index d9673fce0..0b313e648 100644 --- a/langs/layers/nl.json +++ b/langs/layers/nl.json @@ -4046,6 +4046,9 @@ }, "17": { "then": "
Restafval kan hier gerecycled worden
" + }, + "18": { + "then": "
Restafval kan hier gerecycled worden
" } }, "question": "Wat kan hier gerecycled worden?" From e2dc9e1490afc5b1fff69e3e9640fdbfda78b21a Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Thu, 17 Feb 2022 20:31:21 +0100 Subject: [PATCH 17/26] Fix translations --- assets/layers/recycling/recycling.json | 44 +++++++++++++------------- langs/layers/en.json | 25 +++++++-------- langs/layers/nl.json | 22 ++++++------- 3 files changed, 44 insertions(+), 47 deletions(-) diff --git a/assets/layers/recycling/recycling.json b/assets/layers/recycling/recycling.json index 0e8a1e86b..928b71ebd 100644 --- a/assets/layers/recycling/recycling.json +++ b/assets/layers/recycling/recycling.json @@ -267,8 +267,8 @@ "if": "recycling:organic=yes", "ifnot": "recycling:organic=", "then": { - "en": "
Glass bottles can be recycled here
", - "nl": "
Glazen flessen kunnen hier gerecycled worden
" + "en": "
Organic waste can be recycled here
", + "nl": "
Organisch afval kan hier gerecycled worden
" }, "hideInAnswer": true }, @@ -276,80 +276,80 @@ "if": "recycling:glass_bottles=yes", "ifnot": "recycling:glass_bottles=", "then": { - "en": "
Glass can be recycled here
", - "nl": "
Glas kan hier gerecycled worden
" + "en": "
Glass bottles can be recycled here
", + "nl": "
Glazen flessen kunnen hier gerecycled worden
" } }, { "if": "recycling:glass=yes", "ifnot": "recycling:glass=", "then": { - "en": "
Newspapers can be recycled here
", - "nl": "
Kranten kunnen hier gerecycled worden
" + "en": "
Glass can be recycled here
", + "nl": "
Glas kan hier gerecycled worden
" } }, { "if": "recycling:newspaper=yes", "ifnot": "recycling:newspaper=", "then": { - "en": "
Paper can be recycled here
", - "nl": "
Papier kan hier gerecycled worden
" + "en": "
Newspapers can be recycled here
", + "nl": "
Kranten kunnen hier gerecycled worden
" } }, { "if": "recycling:paper=yes", "ifnot": "recycling:paper=", "then": { - "en": "
Plastic bottles can be recycled here
", - "nl": "
Plastic flessen kunnen hier gerecycled worden
" + "en": "
Paper can be recycled here
", + "nl": "
Papier kan hier gerecycled worden
" } }, { "if": "recycling:plastic_bottles=yes", "ifnot": "recycling:plastic_bottles=", "then": { - "en": "
Plastic packaging can be recycled here
", - "nl": "
Plastic verpakking kan hier gerecycled worden
" + "en": "
Plastic bottles can be recycled here
", + "nl": "
Plastic flessen kunnen hier gerecycled worden
" } }, { "if": "recycling:plastic_packaging=yes", "ifnot": "recycling:plastic_packaging=", "then": { - "en": "
Plastic can be recycled here
", - "nl": "
Plastic kan hier gerecycled worden
" + "en": "
Plastic packaging can be recycled here
", + "nl": "
Plastic verpakking kan hier gerecycled worden
" } }, { "if": "recycling:plastic=yes", "ifnot": "recycling:plastic=", "then": { - "en": "
Scrap metal can be recycled here
", - "nl": "
Oud metaal kan hier gerecycled worden
" + "en": "
Plastic can be recycled here
", + "nl": "
Plastic kan hier gerecycled worden
" } }, { "if": "recycling:scrap_metal=yes", "ifnot": "recycling:scrap_metal=", "then": { - "en": "
Shoes can be recycled here
", - "nl": "
Schoenen kunnen hier gerecycled worden
" + "en": "
Scrap metal can be recycled here
", + "nl": "
Oud metaal kan hier gerecycled worden
" } }, { "if": "recycling:shoes=yes", "ifnot": "recycling:shoes=", "then": { - "en": "
Small electrical appliances can be recycled here
", - "nl": "
Kleine elektronische apparaten kunnen hier gerecycled worden
" + "en": "
Shoes can be recycled here
", + "nl": "
Schoenen kunnen hier gerecycled worden
" } }, { "if": "recycling:small_electrical_appliances=yes", "ifnot": "recycling:small_electrical_appliances=", "then": { - "en": "
Residual waste can be recycled here
", - "nl": "
Restafval kan hier gerecycled worden
" + "en": "
Small electrical appliances can be recycled here
", + "nl": "
Kleine elektronische apparaten kunnen hier gerecycled worden
" } }, { diff --git a/langs/layers/en.json b/langs/layers/en.json index fdb214cf1..0f14fb194 100644 --- a/langs/layers/en.json +++ b/langs/layers/en.json @@ -4282,37 +4282,37 @@ "then": "
Green waste can be recycled here
" }, "7": { - "then": "
Glass bottles can be recycled here
" + "then": "
Organic waste can be recycled here
" }, "8": { - "then": "
Glass can be recycled here
" + "then": "
Glass bottles can be recycled here
" }, "9": { - "then": "
Newspapers can be recycled here
" + "then": "
Glass can be recycled here
" }, "10": { - "then": "
Paper can be recycled here
" + "then": "
Newspapers can be recycled here
" }, "11": { - "then": "
Plastic bottles can be recycled here
" + "then": "
Paper can be recycled here
" }, "12": { - "then": "
Plastic packaging can be recycled here
" + "then": "
Plastic bottles can be recycled here
" }, "13": { - "then": "
Plastic can be recycled here
" + "then": "
Plastic packaging can be recycled here
" }, "14": { - "then": "
Scrap metal can be recycled here
" + "then": "
Plastic can be recycled here
" }, "15": { - "then": "
Shoes can be recycled here
" + "then": "
Scrap metal can be recycled here
" }, "16": { - "then": "
Small electrical appliances can be recycled here
" + "then": "
Shoes can be recycled here
" }, "17": { - "then": "
Residual waste can be recycled here
" + "then": "
Small electrical appliances can be recycled here
" }, "18": { "then": "
Residual waste can be recycled here
" @@ -4339,9 +4339,6 @@ }, "1": { "then": "Recycling container" - }, - "2": { - "then": "Waste disposal bin" } }, "render": "Recycling facility" diff --git a/langs/layers/nl.json b/langs/layers/nl.json index 0b313e648..0b44ce9f2 100644 --- a/langs/layers/nl.json +++ b/langs/layers/nl.json @@ -4015,37 +4015,37 @@ "then": "
Groen afval kan hier gerecycled worden
" }, "7": { - "then": "
Glazen flessen kunnen hier gerecycled worden
" + "then": "
Organisch afval kan hier gerecycled worden
" }, "8": { - "then": "
Glas kan hier gerecycled worden
" + "then": "
Glazen flessen kunnen hier gerecycled worden
" }, "9": { - "then": "
Kranten kunnen hier gerecycled worden
" + "then": "
Glas kan hier gerecycled worden
" }, "10": { - "then": "
Papier kan hier gerecycled worden
" + "then": "
Kranten kunnen hier gerecycled worden
" }, "11": { - "then": "
Plastic flessen kunnen hier gerecycled worden
" + "then": "
Papier kan hier gerecycled worden
" }, "12": { - "then": "
Plastic verpakking kan hier gerecycled worden
" + "then": "
Plastic flessen kunnen hier gerecycled worden
" }, "13": { - "then": "
Plastic kan hier gerecycled worden
" + "then": "
Plastic verpakking kan hier gerecycled worden
" }, "14": { - "then": "
Oud metaal kan hier gerecycled worden
" + "then": "
Plastic kan hier gerecycled worden
" }, "15": { - "then": "
Schoenen kunnen hier gerecycled worden
" + "then": "
Oud metaal kan hier gerecycled worden
" }, "16": { - "then": "
Kleine elektronische apparaten kunnen hier gerecycled worden
" + "then": "
Schoenen kunnen hier gerecycled worden
" }, "17": { - "then": "
Restafval kan hier gerecycled worden
" + "then": "
Kleine elektronische apparaten kunnen hier gerecycled worden
" }, "18": { "then": "
Restafval kan hier gerecycled worden
" From 4801d1df495ad7f802804ee2a63aec94e7b069db Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Fri, 18 Feb 2022 03:15:37 +0100 Subject: [PATCH 18/26] Add small script to autoconvert images to use tags instead --- UI/i18n/Translation.ts | 7 +++- scripts/fixImagesInTagRenderings.ts | 65 +++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 scripts/fixImagesInTagRenderings.ts diff --git a/UI/i18n/Translation.ts b/UI/i18n/Translation.ts index a068be199..30a0f74cb 100644 --- a/UI/i18n/Translation.ts +++ b/UI/i18n/Translation.ts @@ -130,13 +130,16 @@ export class Translation extends BaseUIElement { } public Subs(text: any): Translation { + return this.OnEveryLanguage((template, lang) => Utils.SubstituteKeys(template, text, lang)) + } + + public OnEveryLanguage(f: (s: string, language: string) => string): Translation { const newTranslations = {}; for (const lang in this.translations) { if (!this.translations.hasOwnProperty(lang)) { continue; } - let template: string = this.translations[lang]; - newTranslations[lang] = Utils.SubstituteKeys(template, text, lang); + newTranslations[lang] = f(this.translations[lang], lang); } return new Translation(newTranslations); diff --git a/scripts/fixImagesInTagRenderings.ts b/scripts/fixImagesInTagRenderings.ts new file mode 100644 index 000000000..be5e58e43 --- /dev/null +++ b/scripts/fixImagesInTagRenderings.ts @@ -0,0 +1,65 @@ +import {readFileSync, writeFileSync} from "fs"; +import {DesugaringStep} from "../Models/ThemeConfig/Conversion/Conversion"; +import {LayerConfigJson} from "../Models/ThemeConfig/Json/LayerConfigJson"; +import {Utils} from "../Utils"; +import Translations from "../UI/i18n/Translations"; + +class ConvertImagesToIcon extends DesugaringStep { + private _iconClass: string; + + constructor(iconClass: string) { + super("Searches for images in the 'then' path, removes the block and extracts the image itself a 'icon'", + [], "ConvertImagesToIcon") + this._iconClass = iconClass; + } + + convert(json: LayerConfigJson, context: string): { result: LayerConfigJson; errors?: string[]; warnings?: string[]; information?: string[] } { + const information = [] + const errors = [] + json = Utils.Clone(json) + Utils.WalkPath( + ["tagRenderings", "mappings"], + json, + mapping => { + const then = Translations.T(mapping.then) + const images = Utils.Dedup(then.ExtractImages()) + if (images.length == 0) { + return mapping + } + if (images.length > 1) { + errors.push("The mapping " + mapping.then + " has multiple images: " + images.join(", ")) + } + information.push("Replaced image " + images[0]) + const replaced = then.OnEveryLanguage((s) => { + return s.replace(/(
]*>)?]*> ?/, "").replace(/<\/div>$/, "") + }) + + mapping.then = replaced.translations + mapping.icon = {path: images[0], class: this._iconClass} + return mapping + } + ) + + return { + information, + result: json + }; + } +} + +/** + * One-of script to load one layer.json-file and rewrite all tagrenderings + */ +function main() { + let args = [...process.argv] + args.splice(0, 2) + const path = args[0] + const iconClass = args[1] ?? "small" + console.log("Fixing images in " + path) + const parsed = JSON.parse(readFileSync(path, "UTF8")) + const converted = new ConvertImagesToIcon(iconClass).convertStrict(parsed, "While running the fixImagesInTagRenderings-script") + writeFileSync(path + ".autoconverted.json", JSON.stringify(converted, null, " ")) + console.log("Written fixed version to " + path + ".autoconverted.json") +} + +main(); \ No newline at end of file From f2d022664a275c2cfe48cfe02af202546fd5cd6a Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Fri, 18 Feb 2022 03:16:05 +0100 Subject: [PATCH 19/26] Convert tagrendering-mappings with images to tagrendering-mapping with an icon --- assets/layers/recycling/recycling.json | 154 ++++++++++++++++++------- 1 file changed, 115 insertions(+), 39 deletions(-) diff --git a/assets/layers/recycling/recycling.json b/assets/layers/recycling/recycling.json index 928b71ebd..3d1d23ffb 100644 --- a/assets/layers/recycling/recycling.json +++ b/assets/layers/recycling/recycling.json @@ -211,153 +211,229 @@ "if": "recycling:batteries=yes", "ifnot": "recycling:batteries=", "then": { - "en": "
Batteries can be recycled here
", - "nl": "
Batterijen kunnen hier gerecycled worden
" + "en": "Batteries can be recycled here", + "nl": "Batterijen kunnen hier gerecycled worden" + }, + "icon": { + "path": "./assets/layers/recycling/batteries.svg", + "class": "medium" } }, { "if": "recycling:beverage_cartons=yes", "ifnot": "recycling:beverage_cartons=", "then": { - "en": "
Beverage cartons can be recycled here
", - "nl": "
Drankpakken kunnen hier gerecycled worden
" + "en": "Beverage cartons can be recycled here", + "nl": "Drankpakken kunnen hier gerecycled worden" + }, + "icon": { + "path": "./assets/layers/recycling/beverage_cartons.svg", + "class": "medium" } }, { "if": "recycling:cans=yes", "ifnot": "recycling:cans=", "then": { - "en": "
Cans can be recycled here
", - "nl": "
Blikken kunnen hier gerecycled worden
" + "en": "Cans can be recycled here", + "nl": "Blikken kunnen hier gerecycled worden" + }, + "icon": { + "path": "./assets/layers/recycling/cans.svg", + "class": "medium" } }, { "if": "recycling:clothes=yes", "ifnot": "recycling:clothes=", "then": { - "en": "
Clothes can be recycled here
", - "nl": "
Kleren kunnen hier gerecycled worden
" + "en": "Clothes can be recycled here", + "nl": "Kleren kunnen hier gerecycled worden" + }, + "icon": { + "path": "./assets/layers/recycling/clothes.svg", + "class": "medium" } }, { "if": "recycling:cooking_oil=yes", "ifnot": "recycling:cooking_oil=", "then": { - "en": "
Cooking oil can be recycled here
", - "nl": "
Frituurvet kan hier gerecycled worden
" + "en": "Cooking oil can be recycled here", + "nl": "Frituurvet kan hier gerecycled worden" + }, + "icon": { + "path": "./assets/layers/recycling/cooking_oil.svg", + "class": "medium" } }, { "if": "recycling:engine_oil=yes", "ifnot": "recycling:engine_oil=", "then": { - "en": "
Engine oil can be recycled here
", - "nl": "
Motorolie kan hier gerecycled worden
" + "en": "Engine oil can be recycled here", + "nl": "Motorolie kan hier gerecycled worden" + }, + "icon": { + "path": "./assets/layers/recycling/engine_oil.svg", + "class": "medium" } }, { "if": "recycling:green_waste=yes", "ifnot": "recycling:green_waste=", "then": { - "en": "
Green waste can be recycled here
", - "nl": "
Groen afval kan hier gerecycled worden
" + "en": "Green waste can be recycled here", + "nl": "Groen afval kan hier gerecycled worden" + }, + "icon": { + "path": "./assets/layers/recycling/garden_waste.svg", + "class": "medium" } }, { "if": "recycling:organic=yes", "ifnot": "recycling:organic=", "then": { - "en": "
Organic waste can be recycled here
", - "nl": "
Organisch afval kan hier gerecycled worden
" + "en": "Organic waste can be recycled here", + "nl": "Organisch afval kan hier gerecycled worden" }, - "hideInAnswer": true + "hideInAnswer": true, + "icon": { + "path": "./assets/layers/recycling/garden_waste.svg", + "class": "medium" + } }, { "if": "recycling:glass_bottles=yes", "ifnot": "recycling:glass_bottles=", "then": { - "en": "
Glass bottles can be recycled here
", - "nl": "
Glazen flessen kunnen hier gerecycled worden
" + "en": "Glass bottles can be recycled here", + "nl": "Glazen flessen kunnen hier gerecycled worden" + }, + "icon": { + "path": "./assets/layers/recycling/glass_bottles.svg", + "class": "medium" } }, { "if": "recycling:glass=yes", "ifnot": "recycling:glass=", "then": { - "en": "
Glass can be recycled here
", - "nl": "
Glas kan hier gerecycled worden
" + "en": "Glass can be recycled here", + "nl": "Glas kan hier gerecycled worden" + }, + "icon": { + "path": "./assets/layers/recycling/glass.svg", + "class": "medium" } }, { "if": "recycling:newspaper=yes", "ifnot": "recycling:newspaper=", "then": { - "en": "
Newspapers can be recycled here
", - "nl": "
Kranten kunnen hier gerecycled worden
" + "en": "Newspapers can be recycled here", + "nl": "Kranten kunnen hier gerecycled worden" + }, + "icon": { + "path": "./assets/layers/recycling/newspaper.svg", + "class": "medium" } }, { "if": "recycling:paper=yes", "ifnot": "recycling:paper=", "then": { - "en": "
Paper can be recycled here
", - "nl": "
Papier kan hier gerecycled worden
" + "en": "Paper can be recycled here", + "nl": "Papier kan hier gerecycled worden" + }, + "icon": { + "path": "./assets/layers/recycling/paper.svg", + "class": "medium" } }, { "if": "recycling:plastic_bottles=yes", "ifnot": "recycling:plastic_bottles=", "then": { - "en": "
Plastic bottles can be recycled here
", - "nl": "
Plastic flessen kunnen hier gerecycled worden
" + "en": "Plastic bottles can be recycled here", + "nl": "Plastic flessen kunnen hier gerecycled worden" + }, + "icon": { + "path": "./assets/layers/recycling/plastic_bottles.svg", + "class": "medium" } }, { "if": "recycling:plastic_packaging=yes", "ifnot": "recycling:plastic_packaging=", "then": { - "en": "
Plastic packaging can be recycled here
", - "nl": "
Plastic verpakking kan hier gerecycled worden
" + "en": "Plastic packaging can be recycled here", + "nl": "Plastic verpakking kan hier gerecycled worden" + }, + "icon": { + "path": "./assets/layers/recycling/plastic_packaging.svg", + "class": "medium" } }, { "if": "recycling:plastic=yes", "ifnot": "recycling:plastic=", "then": { - "en": "
Plastic can be recycled here
", - "nl": "
Plastic kan hier gerecycled worden
" + "en": "Plastic can be recycled here", + "nl": "Plastic kan hier gerecycled worden" + }, + "icon": { + "path": "./assets/layers/recycling/plastic.svg", + "class": "medium" } }, { "if": "recycling:scrap_metal=yes", "ifnot": "recycling:scrap_metal=", "then": { - "en": "
Scrap metal can be recycled here
", - "nl": "
Oud metaal kan hier gerecycled worden
" + "en": "Scrap metal can be recycled here", + "nl": "Oud metaal kan hier gerecycled worden" + }, + "icon": { + "path": "./assets/layers/recycling/scrap_metal.svg", + "class": "medium" } }, { "if": "recycling:shoes=yes", "ifnot": "recycling:shoes=", "then": { - "en": "
Shoes can be recycled here
", - "nl": "
Schoenen kunnen hier gerecycled worden
" + "en": "Shoes can be recycled here", + "nl": "Schoenen kunnen hier gerecycled worden" + }, + "icon": { + "path": "./assets/layers/recycling/shoes.svg", + "class": "medium" } }, { "if": "recycling:small_electrical_appliances=yes", "ifnot": "recycling:small_electrical_appliances=", "then": { - "en": "
Small electrical appliances can be recycled here
", - "nl": "
Kleine elektronische apparaten kunnen hier gerecycled worden
" + "en": "Small electrical appliances can be recycled here", + "nl": "Kleine elektronische apparaten kunnen hier gerecycled worden" + }, + "icon": { + "path": "./assets/layers/recycling/small_electrical_appliances.svg", + "class": "medium" } }, { "if": "recycling:waste=yes", "ifnot": "recycling:waste=", "then": { - "en": "
Residual waste can be recycled here
", - "nl": "
Restafval kan hier gerecycled worden
" + "en": "Residual waste can be recycled here", + "nl": "Restafval kan hier gerecycled worden" + }, + "icon": { + "path": "./assets/layers/waste_disposal/waste_disposal.svg", + "class": "medium" } } ] From 63327c883293a6dfaac2e3ad1c48a2119a652c18 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Fri, 18 Feb 2022 11:02:38 +0100 Subject: [PATCH 20/26] Reset translations (double images) --- langs/layers/en.json | 38 +++++++++++++++++++------------------- langs/layers/nl.json | 38 +++++++++++++++++++------------------- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/langs/layers/en.json b/langs/layers/en.json index 34b124697..faf063421 100644 --- a/langs/layers/en.json +++ b/langs/layers/en.json @@ -4258,61 +4258,61 @@ "recycling-accepts": { "mappings": { "0": { - "then": "
Batteries can be recycled here
" + "then": "Batteries can be recycled here" }, "1": { - "then": "
Beverage cartons can be recycled here
" + "then": "Beverage cartons can be recycled here" }, "2": { - "then": "
Cans can be recycled here
" + "then": "Cans can be recycled here" }, "3": { - "then": "
Clothes can be recycled here
" + "then": "Clothes can be recycled here" }, "4": { - "then": "
Cooking oil can be recycled here
" + "then": "Cooking oil can be recycled here" }, "5": { - "then": "
Engine oil can be recycled here
" + "then": "Engine oil can be recycled here" }, "6": { - "then": "
Green waste can be recycled here
" + "then": "Green waste can be recycled here" }, "7": { - "then": "
Organic waste can be recycled here
" + "then": "Organic waste can be recycled here" }, "8": { - "then": "
Glass bottles can be recycled here
" + "then": "Glass bottles can be recycled here" }, "9": { - "then": "
Glass can be recycled here
" + "then": "Glass can be recycled here" }, "10": { - "then": "
Newspapers can be recycled here
" + "then": "Newspapers can be recycled here" }, "11": { - "then": "
Paper can be recycled here
" + "then": "Paper can be recycled here" }, "12": { - "then": "
Plastic bottles can be recycled here
" + "then": "Plastic bottles can be recycled here" }, "13": { - "then": "
Plastic packaging can be recycled here
" + "then": "Plastic packaging can be recycled here" }, "14": { - "then": "
Plastic can be recycled here
" + "then": "Plastic can be recycled here" }, "15": { - "then": "
Scrap metal can be recycled here
" + "then": "Scrap metal can be recycled here" }, "16": { - "then": "
Shoes can be recycled here
" + "then": "Shoes can be recycled here" }, "17": { - "then": "
Small electrical appliances can be recycled here
" + "then": "Small electrical appliances can be recycled here" }, "18": { - "then": "
Residual waste can be recycled here
" + "then": "Residual waste can be recycled here" } }, "question": "What can be recycled here?" diff --git a/langs/layers/nl.json b/langs/layers/nl.json index f7ab9beb0..9433aaf7b 100644 --- a/langs/layers/nl.json +++ b/langs/layers/nl.json @@ -4050,61 +4050,61 @@ "recycling-accepts": { "mappings": { "0": { - "then": "
Batterijen kunnen hier gerecycled worden
" + "then": "Batterijen kunnen hier gerecycled worden" }, "1": { - "then": "
Drankpakken kunnen hier gerecycled worden
" + "then": "Drankpakken kunnen hier gerecycled worden" }, "2": { - "then": "
Blikken kunnen hier gerecycled worden
" + "then": "Blikken kunnen hier gerecycled worden" }, "3": { - "then": "
Kleren kunnen hier gerecycled worden
" + "then": "Kleren kunnen hier gerecycled worden" }, "4": { - "then": "
Frituurvet kan hier gerecycled worden
" + "then": "Frituurvet kan hier gerecycled worden" }, "5": { - "then": "
Motorolie kan hier gerecycled worden
" + "then": "Motorolie kan hier gerecycled worden" }, "6": { - "then": "
Groen afval kan hier gerecycled worden
" + "then": "Groen afval kan hier gerecycled worden" }, "7": { - "then": "
Organisch afval kan hier gerecycled worden
" + "then": "Organisch afval kan hier gerecycled worden" }, "8": { - "then": "
Glazen flessen kunnen hier gerecycled worden
" + "then": "Glazen flessen kunnen hier gerecycled worden" }, "9": { - "then": "
Glas kan hier gerecycled worden
" + "then": "Glas kan hier gerecycled worden" }, "10": { - "then": "
Kranten kunnen hier gerecycled worden
" + "then": "Kranten kunnen hier gerecycled worden" }, "11": { - "then": "
Papier kan hier gerecycled worden
" + "then": "Papier kan hier gerecycled worden" }, "12": { - "then": "
Plastic flessen kunnen hier gerecycled worden
" + "then": "Plastic flessen kunnen hier gerecycled worden" }, "13": { - "then": "
Plastic verpakking kan hier gerecycled worden
" + "then": "Plastic verpakking kan hier gerecycled worden" }, "14": { - "then": "
Plastic kan hier gerecycled worden
" + "then": "Plastic kan hier gerecycled worden" }, "15": { - "then": "
Oud metaal kan hier gerecycled worden
" + "then": "Oud metaal kan hier gerecycled worden" }, "16": { - "then": "
Schoenen kunnen hier gerecycled worden
" + "then": "Schoenen kunnen hier gerecycled worden" }, "17": { - "then": "
Kleine elektronische apparaten kunnen hier gerecycled worden
" + "then": "Kleine elektronische apparaten kunnen hier gerecycled worden" }, "18": { - "then": "
Restafval kan hier gerecycled worden
" + "then": "Restafval kan hier gerecycled worden" } }, "question": "Wat kan hier gerecycled worden?" From 62153e0eb42530c68b2ba4d5068317aeea84c420 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Fri, 18 Feb 2022 11:52:44 +0100 Subject: [PATCH 21/26] Small fixes (organic and appliances) --- assets/layers/recycling/recycling.json | 36 +++++++++++++++++++++++--- langs/layers/en.json | 3 +++ langs/layers/nl.json | 5 +++- 3 files changed, 39 insertions(+), 5 deletions(-) diff --git a/assets/layers/recycling/recycling.json b/assets/layers/recycling/recycling.json index 3d1d23ffb..b0e3f9562 100644 --- a/assets/layers/recycling/recycling.json +++ b/assets/layers/recycling/recycling.json @@ -112,7 +112,12 @@ "then": "circle:#FFFFFF;./assets/layers/recycling/shoes.svg" }, { - "if": "recycling:small_electrical_appliances=yes", + "if": { + "or": [ + "recycling:small_appliances=yes", + "recycling:small_electrical_appliances=yes" + ] + }, "then": "circle:#FFFFFF;./assets/layers/recycling/small_electrical_appliances.svg" }, { @@ -412,13 +417,26 @@ "class": "medium" } }, + { + "if": "recycling:small_appliances=yes", + "ifnot": "recycling:small_appliances=", + "then": { + "en": "Small electrical appliances can be recycled here", + "nl": "Kleine elektrische apparaten kunnen hier gerecycled worden" + }, + "icon": { + "path": "./assets/layers/recycling/small_electrical_appliances.svg", + "class": "medium" + } + }, { "if": "recycling:small_electrical_appliances=yes", "ifnot": "recycling:small_electrical_appliances=", "then": { "en": "Small electrical appliances can be recycled here", - "nl": "Kleine elektronische apparaten kunnen hier gerecycled worden" + "nl": "Kleine elektrische apparaten kunnen hier gerecycled worden" }, + "hideInAnswer": true, "icon": { "path": "./assets/layers/recycling/small_electrical_appliances.svg", "class": "medium" @@ -544,7 +562,12 @@ "en": "Recycling of green waste", "nl": "Recycling van groen afval" }, - "osmTags": "recycling:green_waste=yes" + "osmTags": { + "or": [ + "recycling:green_waste=yes", + "recycling:organic=yes" + ] + } }, { "question": { @@ -607,7 +630,12 @@ "en": "Recycling of small electrical appliances", "nl": "Recycling van kleine elektrische apparaten" }, - "osmTags": "recycling:small_electrical_appliances=yes" + "osmTags": { + "or": [ + "recycling:small_appliances=yes", + "recycling:small_electrical_appliances=yes" + ] + } }, { "question": { diff --git a/langs/layers/en.json b/langs/layers/en.json index faf063421..a10d84461 100644 --- a/langs/layers/en.json +++ b/langs/layers/en.json @@ -4312,6 +4312,9 @@ "then": "Small electrical appliances can be recycled here" }, "18": { + "then": "Small electrical appliances can be recycled here" + }, + "19": { "then": "Residual waste can be recycled here" } }, diff --git a/langs/layers/nl.json b/langs/layers/nl.json index 9433aaf7b..23fda94ad 100644 --- a/langs/layers/nl.json +++ b/langs/layers/nl.json @@ -4101,9 +4101,12 @@ "then": "Schoenen kunnen hier gerecycled worden" }, "17": { - "then": "Kleine elektronische apparaten kunnen hier gerecycled worden" + "then": "Kleine elektrische apparaten kunnen hier gerecycled worden" }, "18": { + "then": "Kleine elektrische apparaten kunnen hier gerecycled worden" + }, + "19": { "then": "Restafval kan hier gerecycled worden" } }, From cc086eaee1f8a81622f5970c0acb95a73aba4ab5 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Sat, 19 Feb 2022 21:37:54 +0100 Subject: [PATCH 22/26] Allow changing type --- assets/layers/recycling/recycling.json | 32 +++++++++++++++++++++++++- langs/layers/en.json | 3 +++ langs/layers/nl.json | 3 +++ 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/assets/layers/recycling/recycling.json b/assets/layers/recycling/recycling.json index b0e3f9562..d42d1bf81 100644 --- a/assets/layers/recycling/recycling.json +++ b/assets/layers/recycling/recycling.json @@ -170,6 +170,35 @@ "en": "This is a recycling centre", "nl": "Dit is een recyclingcentrum" } + }, + { + "if": "amenity=waste_disposal", + "then": { + "en": "Waste disposal container for residual waste", + "nl": "Afvalcontainer voor restafval" + }, + "addExtraTags": [ + "recycling:batteries=", + "recycling:beverage_cartons=", + "recycling:cans=", + "recycling:clothes=", + "recycling:cooking_oil=", + "recycling:engine_oil=", + "recycling:green_waste=", + "recycling:organic=", + "recycling:glass_bottles=", + "recycling:glass=", + "recycling:newspaper=", + "recycling:paper=", + "recycling:plastic_bottles=", + "recycling:plastic_packaging=", + "recycling:plastic=", + "recycling:scrap_metal=", + "recycling:shoes=", + "recycling:small_appliances=", + "recycling:small_electrical_appliances=", + "recycling:waste=" + ] } ] }, @@ -452,7 +481,8 @@ "icon": { "path": "./assets/layers/waste_disposal/waste_disposal.svg", "class": "medium" - } + }, + "hideInAnswer": "recycling_type=container" } ] }, diff --git a/langs/layers/en.json b/langs/layers/en.json index a10d84461..54d43657b 100644 --- a/langs/layers/en.json +++ b/langs/layers/en.json @@ -4327,6 +4327,9 @@ }, "1": { "then": "This is a recycling centre" + }, + "2": { + "then": "Waste disposal container for residual waste" } }, "question": "What type of recycling is this?" diff --git a/langs/layers/nl.json b/langs/layers/nl.json index 23fda94ad..a4ce4c6a5 100644 --- a/langs/layers/nl.json +++ b/langs/layers/nl.json @@ -4119,6 +4119,9 @@ }, "1": { "then": "Dit is een recyclingcentrum" + }, + "2": { + "then": "Afvalcontainer voor restafval" } }, "question": "Wat voor soort recycling is dit?" From d49fd8df1f418458eeaf3824701cf5dc334b599a Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Sat, 19 Feb 2022 21:40:12 +0100 Subject: [PATCH 23/26] Add white background to icon --- assets/layers/waste_disposal/waste_disposal.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/layers/waste_disposal/waste_disposal.json b/assets/layers/waste_disposal/waste_disposal.json index dc5c2e334..a589d75d1 100644 --- a/assets/layers/waste_disposal/waste_disposal.json +++ b/assets/layers/waste_disposal/waste_disposal.json @@ -22,7 +22,7 @@ "point", "centroid" ], - "icon": "./assets/layers/waste_disposal/waste_disposal.svg" + "icon": "circle:white;./assets/layers/waste_disposal/waste_disposal.svg" } ], "presets": [ From 2e51a4566890f3cf467d5537b8f5c9c06f8d3c9c Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Sat, 19 Feb 2022 22:52:52 +0100 Subject: [PATCH 24/26] Use icon of waste if only one is set --- assets/layers/recycling/recycling.json | 407 ++++++++++++++++++++----- 1 file changed, 338 insertions(+), 69 deletions(-) diff --git a/assets/layers/recycling/recycling.json b/assets/layers/recycling/recycling.json index d42d1bf81..43942ac3d 100644 --- a/assets/layers/recycling/recycling.json +++ b/assets/layers/recycling/recycling.json @@ -11,6 +11,9 @@ "source": { "osmTags": "amenity=recycling" }, + "calculatedTags": [ + "_waste_amount=Object.values(Object.keys(feat.properties).filter((key) => key.startsWith('recycling:')).reduce((cur, key) => { return Object.assign(cur, { [key]: feat.properties[key] })}, {})).reduce((n, x) => n + (x == \"yes\"), 0);" + ], "minzoom": 12, "title": { "render": { @@ -40,89 +43,355 @@ "point", "centroid" ], - "icon": "circle:white;./assets/layers/recycling/recycling-14.svg", + "icon": { + "render": "circle:white;./assets/layers/recycling/recycling-14.svg", + "mappings": [ + { + "if": { + "and": [ + "_waste_amount=1", + "recycling:batteries=yes" + ] + }, + "then": "circle:white;./assets/layers/recycling/batteries.svg" + }, + { + "if": { + "and": [ + "_waste_amount=1", + "recycling:beverage_cartons=yes" + ] + }, + "then": "circle:white;./assets/layers/recycling/beverage_cartons.svg" + }, + { + "if": { + "and": [ + "_waste_amount=1", + "recycling:cans=yes" + ] + }, + "then": "circle:white;./assets/layers/recycling/cans.svg" + }, + { + "if": { + "and": [ + "_waste_amount=1", + "recycling:clothes=yes" + ] + }, + "then": "circle:white;./assets/layers/recycling/clothes.svg" + }, + { + "if": { + "and": [ + "_waste_amount=1", + "recycling:cooking_oil=yes" + ] + }, + "then": "circle:white;./assets/layers/recycling/cooking_oil.svg" + }, + { + "if": { + "and": [ + "_waste_amount=1", + "recycling:engine_oil=yes" + ] + }, + "then": "circle:white;./assets/layers/recycling/engine_oil.svg" + }, + { + "if": { + "and": [ + "_waste_amount=1", + "recycling:glass=yes" + ] + }, + "then": "circle:white;./assets/layers/recycling/glass.svg" + }, + { + "if": { + "and": [ + "_waste_amount=1", + "recycling:glass_bottles=yes" + ] + }, + "then": "circle:white;./assets/layers/recycling/glass_bottles.svg" + }, + { + "if": { + "and": [ + "_waste_amount=1", + { + "or": [ + "recycling:green_waste=yes", + "recycling:organic=yes" + ] + } + ] + }, + "then": "circle:white;./assets/layers/recycling/garden_waste.svg" + }, + { + "if": { + "and": [ + "_waste_amount=1", + "recycling:newspaper=yes" + ] + }, + "then": "circle:white;./assets/layers/recycling/newspaper.svg" + }, + { + "if": { + "and": [ + "_waste_amount=1", + "recycling:paper=yes" + ] + }, + "then": "circle:white;./assets/layers/recycling/paper.svg" + }, + { + "if": { + "and": [ + "_waste_amount=1", + "recycling:plastic_bottles=yes" + ] + }, + "then": "circle:white;./assets/layers/recycling/plastic_bottles.svg" + }, + { + "if": { + "and": [ + "_waste_amount=1", + "recycling:plastic_packaging=yes" + ] + }, + "then": "circle:white;./assets/layers/recycling/plastic_packaging.svg" + }, + { + "if": { + "and": [ + "_waste_amount=1", + "recycling:plastic=yes" + ] + }, + "then": "circle:white;./assets/layers/recycling/plastic.svg" + }, + { + "if": { + "and": [ + "_waste_amount=1", + "recycling:scrap_metal=yes" + ] + }, + "then": "circle:white;./assets/layers/recycling/scrap_metal.svg" + }, + { + "if": { + "and": [ + "_waste_amount=1", + "recycling:shoes=yes" + ] + }, + "then": "circle:white;./assets/layers/recycling/shoes.svg" + }, + { + "if": { + "and": [ + "_waste_amount=1", + { + "or": [ + "recycling:small_appliances=yes", + "recycling:small_electric_appliances=yes" + ] + } + ] + }, + "then": "circle:white;./assets/layers/recycling/small_electrical_appliances.svg" + }, + { + "if": { + "and": [ + "_waste_amount=1", + "recycling:waste=yes" + ] + }, + "then": "circle:white;./assets/layers/waste_disposal/waste_disposal.svg" + } + ] + }, "iconBadges": [ { - "if": "recycling:batteries=yes", - "then": "circle:#FFFFFF;./assets/layers/recycling/batteries.svg" - }, - { - "if": "recycling:beverage_cartons=yes", - "then": "circle:#FFFFFF;./assets/layers/recycling/beverage_cartons.svg" - }, - { - "if": "recycling:cans=yes", - "then": "circle:#FFFFFF;./assets/layers/recycling/cans.svg" - }, - { - "if": "recycling:clothes=yes", - "then": "circle:#FFFFFF;./assets/layers/recycling/clothes.svg" - }, - { - "if": "recycling:cooking_oil=yes", - "then": "circle:#FFFFFF;./assets/layers/recycling/cooking_oil.svg" - }, - { - "if": "recycling:engine_oil=yes", - "then": "circle:#FFFFFF;./assets/layers/recycling/engine_oil.svg" - }, - { - "if": "recycling:glass=yes", - "then": "circle:#FFFFFF;./assets/layers/recycling/glass.svg" - }, - { - "if": "recycling:glass_bottles=yes", - "then": "circle:#FFFFFF;./assets/layers/recycling/glass_bottles.svg" + "if": { + "and": [ + "_waste_amount>1", + "recycling:batteries=yes" + ] + }, + "then": "circle:white;./assets/layers/recycling/batteries.svg" }, { "if": { - "or": [ - "recycling:green_waste=yes", - "recycling:organic=yes" + "and": [ + "_waste_amount>1", + "recycling:beverage_cartons=yes" ] }, - "then": "circle:#FFFFFF;./assets/layers/recycling/garden_waste.svg" - }, - { - "if": "recycling:newspaper=yes", - "then": "circle:#FFFFFF;./assets/layers/recycling/newspaper.svg" - }, - { - "if": "recycling:paper=yes", - "then": "circle:#FFFFFF;./assets/layers/recycling/paper.svg" - }, - { - "if": "recycling:plastic_bottles=yes", - "then": "circle:#FFFFFF;./assets/layers/recycling/plastic_bottles.svg" - }, - { - "if": "recycling:plastic_packaging=yes", - "then": "circle:#FFFFFF;./assets/layers/recycling/plastic_packaging.svg" - }, - { - "if": "recycling:plastic=yes", - "then": "circle:#FFFFFF;./assets/layers/recycling/plastic.svg" - }, - { - "if": "recycling:scrap_metal=yes", - "then": "circle:#FFFFFF;./assets/layers/recycling/scrap_metal.svg" - }, - { - "if": "recyling:shoes=yes", - "then": "circle:#FFFFFF;./assets/layers/recycling/shoes.svg" + "then": "circle:white;./assets/layers/recycling/beverage_cartons.svg" }, { "if": { - "or": [ - "recycling:small_appliances=yes", - "recycling:small_electrical_appliances=yes" + "and": [ + "_waste_amount>1", + "recycling:cans=yes" ] }, - "then": "circle:#FFFFFF;./assets/layers/recycling/small_electrical_appliances.svg" + "then": "circle:white;./assets/layers/recycling/cans.svg" }, { - "if": "recycling:waste=yes", - "then": "circle:#FFFFFF;./assets/layers/waste_disposal/waste_disposal.svg" + "if": { + "and": [ + "_waste_amount>1", + "recycling:clothes=yes" + ] + }, + "then": "circle:white;./assets/layers/recycling/clothes.svg" + }, + { + "if": { + "and": [ + "_waste_amount>1", + "recycling:cooking_oil=yes" + ] + }, + "then": "circle:white;./assets/layers/recycling/cooking_oil.svg" + }, + { + "if": { + "and": [ + "_waste_amount>1", + "recycling:engine_oil=yes" + ] + }, + "then": "circle:white;./assets/layers/recycling/engine_oil.svg" + }, + { + "if": { + "and": [ + "_waste_amount>1", + "recycling:glass=yes" + ] + }, + "then": "circle:white;./assets/layers/recycling/glass.svg" + }, + { + "if": { + "and": [ + "_waste_amount>1", + "recycling:glass_bottles=yes" + ] + }, + "then": "circle:white;./assets/layers/recycling/glass_bottles.svg" + }, + { + "if": { + "and": [ + "_waste_amount=1", + { + "or": [ + "recycling:green_waste=yes", + "recycling:organic=yes" + ] + } + ] + }, + "then": "circle:white;./assets/layers/recycling/garden_waste.svg" + }, + { + "if": { + "and": [ + "_waste_amount>1", + "recycling:newspaper=yes" + ] + }, + "then": "circle:white;./assets/layers/recycling/newspaper.svg" + }, + { + "if": { + "and": [ + "_waste_amount>1", + "recycling:paper=yes" + ] + }, + "then": "circle:white;./assets/layers/recycling/paper.svg" + }, + { + "if": { + "and": [ + "_waste_amount>1", + "recycling:plastic_bottles=yes" + ] + }, + "then": "circle:white;./assets/layers/recycling/plastic_bottles.svg" + }, + { + "if": { + "and": [ + "_waste_amount>1", + "recycling:plastic_packaging=yes" + ] + }, + "then": "circle:white;./assets/layers/recycling/plastic_packaging.svg" + }, + { + "if": { + "and": [ + "_waste_amount>1", + "recycling:plastic=yes" + ] + }, + "then": "circle:white;./assets/layers/recycling/plastic.svg" + }, + { + "if": { + "and": [ + "_waste_amount>1", + "recycling:scrap_metal=yes" + ] + }, + "then": "circle:white;./assets/layers/recycling/scrap_metal.svg" + }, + { + "if": { + "and": [ + "_waste_amount>1", + "recycling:shoes=yes" + ] + }, + "then": "circle:white;./assets/layers/recycling/shoes.svg" + }, + { + "if": { + "and": [ + "_waste_amount>1", + { + "or": [ + "recycling:small_appliances=yes", + "recycling:small_electrical_appliances=yes" + ] + } + ] + }, + "then": "circle:white;./assets/layers/recycling/small_electrical_appliances.svg" + }, + { + "if": { + "and": [ + "_waste_amount>1", + "recycling:waste=yes" + ] + }, + "then": "circle:white;./assets/layers/waste_disposal/waste_disposal.svg" } ] } From eddaca7767387ddde3129440ff233080e5f674b1 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Sun, 20 Feb 2022 01:46:31 +0100 Subject: [PATCH 25/26] Fix typo --- assets/layers/recycling/recycling.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/layers/recycling/recycling.json b/assets/layers/recycling/recycling.json index 43942ac3d..84b10f009 100644 --- a/assets/layers/recycling/recycling.json +++ b/assets/layers/recycling/recycling.json @@ -296,7 +296,7 @@ { "if": { "and": [ - "_waste_amount=1", + "_waste_amount>1", { "or": [ "recycling:green_waste=yes", From d19791382f3d0798a72a28776eda99074447a0d1 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Mon, 21 Feb 2022 11:39:57 +0100 Subject: [PATCH 26/26] Add move and delete options --- assets/layers/recycling/recycling.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/assets/layers/recycling/recycling.json b/assets/layers/recycling/recycling.json index 84b10f009..270620fd6 100644 --- a/assets/layers/recycling/recycling.json +++ b/assets/layers/recycling/recycling.json @@ -945,5 +945,10 @@ } ] } - ] + ], + "deletion": {"neededChangesets": 1}, + "allowMove": { + "enableRelocation": false, + "enableImproveAccuracy": true + } } \ No newline at end of file