From 3bdf51920548504769fa6bbdfb8c1fc8cece8449 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Thu, 29 Jun 2023 16:30:43 +0200 Subject: [PATCH 1/3] Small vending machine theme --- .vscode/settings.json | 3 +- assets/layers/vending_machine/cow.svg | 1 + assets/layers/vending_machine/egg.svg | 1 + .../layers/vending_machine/license_info.json | 62 + assets/layers/vending_machine/mug-saucer.svg | 1 + assets/layers/vending_machine/smoking.svg | 1 + assets/layers/vending_machine/utensils.svg | 1 + .../vending_machine/vending_machine.json | 501 +++++++ .../vending_machine/vending_machine.svg | 1202 +++++++++++++++++ .../mapcomplete-changes.json | 4 + .../vending_machine/vending_machine.json | 18 + 11 files changed, 1794 insertions(+), 1 deletion(-) create mode 100644 assets/layers/vending_machine/cow.svg create mode 100644 assets/layers/vending_machine/egg.svg create mode 100644 assets/layers/vending_machine/license_info.json create mode 100644 assets/layers/vending_machine/mug-saucer.svg create mode 100644 assets/layers/vending_machine/smoking.svg create mode 100644 assets/layers/vending_machine/utensils.svg create mode 100644 assets/layers/vending_machine/vending_machine.json create mode 100644 assets/layers/vending_machine/vending_machine.svg create mode 100644 assets/themes/vending_machine/vending_machine.json diff --git a/.vscode/settings.json b/.vscode/settings.json index 26b59e881..8e1ede94e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -17,5 +17,6 @@ "editor.defaultFormatter": "esbenp.prettier-vscode", "[svelte]": { "editor.defaultFormatter": "esbenp.prettier-vscode" - } + }, + "editor.formatOnSave": true } diff --git a/assets/layers/vending_machine/cow.svg b/assets/layers/vending_machine/cow.svg new file mode 100644 index 000000000..8c5ff35c1 --- /dev/null +++ b/assets/layers/vending_machine/cow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/layers/vending_machine/egg.svg b/assets/layers/vending_machine/egg.svg new file mode 100644 index 000000000..2b943ee85 --- /dev/null +++ b/assets/layers/vending_machine/egg.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/layers/vending_machine/license_info.json b/assets/layers/vending_machine/license_info.json new file mode 100644 index 000000000..68add3b78 --- /dev/null +++ b/assets/layers/vending_machine/license_info.json @@ -0,0 +1,62 @@ +[ + { + "path": "cow.svg", + "license": "CC-BY 4.0", + "authors": [ + "Font Awesome" + ], + "sources": [ + "https://fontawesome.com/icons/cow?f=classic&s=solid" + ] + }, + { + "path": "egg.svg", + "license": "CC-BY 4.0", + "authors": [ + "Font Awesome" + ], + "sources": [ + "https://fontawesome.com/icons/egg?f=classic&s=solid" + ] + }, + { + "path": "mug-saucer.svg", + "license": "CC-BY 4.0", + "authors": [ + "Font Awesome" + ], + "sources": [ + "https://fontawesome.com/icons/mug-saucer?f=regular&s=solid" + ] + }, + { + "path": "smoking.svg", + "license": "CC-BY 4.0", + "authors": [ + "Font Awesome" + ], + "sources": [ + "https://fontawesome.com/icons/smoking?f=classic&s=solid" + ] + }, + { + "path": "utensils.svg", + "license": "CC-BY 4.0", + "authors": [ + "Font Awesome" + ], + "sources": [ + "https://fontawesome.com/icons/utensils?f=classic&s=solid" + ] + }, + { + "path": "vending_machine.svg", + "license": "CC-BY 4.0", + "authors": [ + "Vectorportal.com" + ], + "sources": [ + "https://vectorportal.com/vector/vending-machine/35308" + ] + } +] \ No newline at end of file diff --git a/assets/layers/vending_machine/mug-saucer.svg b/assets/layers/vending_machine/mug-saucer.svg new file mode 100644 index 000000000..c2dc8cb38 --- /dev/null +++ b/assets/layers/vending_machine/mug-saucer.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/layers/vending_machine/smoking.svg b/assets/layers/vending_machine/smoking.svg new file mode 100644 index 000000000..1dd420f77 --- /dev/null +++ b/assets/layers/vending_machine/smoking.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/layers/vending_machine/utensils.svg b/assets/layers/vending_machine/utensils.svg new file mode 100644 index 000000000..e9523ee92 --- /dev/null +++ b/assets/layers/vending_machine/utensils.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/layers/vending_machine/vending_machine.json b/assets/layers/vending_machine/vending_machine.json new file mode 100644 index 000000000..764ab0692 --- /dev/null +++ b/assets/layers/vending_machine/vending_machine.json @@ -0,0 +1,501 @@ +{ + "id": "vending_machine", + "name": { + "en": "Vending Machines", + "nl": "Verkoopautomaten" + }, + "description": { + "en": "Layer showing vending machines", + "nl": "Laag met verkoopautomaten" + }, + "source": { + "osmTags": { + "and": [ + "amenity=vending_machine", + "vending!~(parking_tickets|public_transport_tickets|bottle_return|excrement_bags)" + ] + } + }, + "title": { + "render": { + "en": "Vending machine", + "nl": "Verkoopautomaat" + }, + "mappings": [ + { + "if": "name~*", + "then": { + "en": "Vending machine {name}", + "nl": "Verkoopautomaat {name}" + } + }, + { + "if": "brand~*", + "then": { + "en": "Vending machine {brand}", + "nl": "Verkoopautomaat {brand}" + } + } + ] + }, + "tagRenderings": [ + "images", + { + "id": "vending", + "question": { + "en": "What does this vending machine sell?", + "nl": "Wat verkoopt deze verkoopautomaat?" + }, + "freeform": { + "key": "vending", + "addExtraTags": [ + "fixme=Freeform input used, value may need to be checked" + ] + }, + "render": { + "en": "This vending machine sells {vending}", + "nl": "Deze verkoopautomaat verkoopt {vending}" + }, + "mappings": [ + { + "if": "vending=drinks", + "then": { + "en": "Drinks are sold", + "nl": "Dranken worden verkocht" + }, + "icon": "./assets/layers/id_presets/temaki-bottles.svg" + }, + { + "if": "vending=sweets", + "then": { + "en": "Sweets are sold", + "nl": "Snoep wordt verkocht" + }, + "icon": "./assets/layers/id_presets/maki-confectionery.svg" + }, + { + "if": "vending=food", + "then": { + "en": "Food is sold", + "nl": "Eten wordt verkocht" + }, + "icon": "./assets/layers/vending_machine/utensils.svg" + }, + { + "if": "vending=cigarettes", + "then": { + "en": "Cigarettes are sold", + "nl": "Sigaretten worden verkocht" + }, + "icon": "./assets/layers/vending_machine/smoking.svg" + }, + { + "if": "vending=condoms", + "then": { + "en": "Condoms are sold", + "nl": "Condooms worden verkocht" + } + }, + { + "if": "vending=coffee", + "then": { + "en": "Coffee is sold", + "nl": "Koffie wordt verkocht" + }, + "icon": "./assets/layers/vending_machine/mug-saucer.svg" + }, + { + "if": "vending=water", + "then": { + "en": "Drinking water is sold", + "nl": "Drinkwater wordt verkocht" + }, + "icon": "./assets/layers/id_presets/temaki-water_bottle.svg" + }, + { + "if": "vending=newspapers", + "then": { + "en": "Newspapers are sold", + "nl": "Kranten worden verkocht" + }, + "icon": "./assets/layers/id_presets/fas-newspaper.svg" + }, + { + "if": "vending=bicycle_tube", + "then": { + "en": "Bicycle inner tubes are sold", + "nl": "Binnenbanden voor fietsen worden verkocht" + } + }, + { + "if": "vending=milk", + "then": { + "en": "Milk is sold", + "nl": "Melk wordt verkocht" + }, + "icon": "./assets/layers/vending_machine/cow.svg" + }, + { + "if": "vending=bread", + "then": { + "en": "Bread is sold", + "nl": "Brood wordt verkocht" + }, + "icon": "./assets/layers/id_presets/maki-bakery.svg" + }, + { + "if": "vending=eggs", + "then": { + "en": "Eggs are sold", + "nl": "Eieren worden verkocht" + }, + "icon": "./assets/layers/vending_machine/egg.svg" + }, + { + "if": "vending=cheese", + "then": { + "en": "Cheese is sold", + "nl": "Kaas wordt verkocht" + }, + "icon": "./assets/layers/id_presets/fas-cheese.svg" + } + ], + "multiAnswer": true + }, + "opening_hours_24_7", + "payment-options-split", + "denominations-coins", + "denominations-notes", + { + "id": "operator", + "question": { + "en": "Who operates this vending machine?", + "nl": "Wie beheert deze verkoopautomaat?" + }, + "freeform": { + "key": "operator", + "placeholder": { + "en": "Name of operator", + "nl": "Naam van beheerder" + } + }, + "render": { + "en": "This vending machine is operated by {operator}", + "nl": "Deze verkoopautomaat wordt beheerd door {operator}" + } + }, + { + "id": "indoor", + "question": { + "en": "Is this vending machine indoors?", + "nl": "Is deze verkoopautomaat binnen?" + }, + "mappings": [ + { + "if": "indoor=", + "then": { + "en": "This vending machine is outdoors", + "nl": "Deze verkoopautomaat is buiten" + }, + "hideInAnswer": true + }, + { + "if": "indoor=yes", + "then": { + "en": "This vending machine is indoors", + "nl": "Deze verkoopautomaat is binnen" + } + }, + { + "if": "indoor=no", + "then": { + "en": "This vending machine is outdoors", + "nl": "Deze verkoopautomaat is buiten" + } + } + ] + }, + "level" + ], + "calculatedTags": [ + "_vending_count=feat.properties.vending.split(';').length" + ], + "presets": [ + { + "title": { + "en": "a vending machine", + "nl": "een verkoopautomaat" + }, + "tags": [ + "amenity=vending_machine" + ] + } + ], + "mapRendering": [ + { + "icon": { + "render": "./assets/layers/vending_machine/vending_machine.svg", + "mappings": [ + { + "if": "vending=drinks", + "then": "circle:white;./assets/layers/id_presets/temaki-bottles.svg" + }, + { + "if": "vending=sweets", + "then": "circle:white;./assets/layers/id_presets/maki-confectionery.svg" + }, + { + "if": "vending=food", + "then": "circle:white;./assets/layers/vending_machine/utensils.svg" + }, + { + "if": "vending=cigarettes", + "then": "circle:white;./assets/layers/vending_machine/smoking.svg" + }, + { + "if": "vending=coffee", + "then": "circle:white;./assets/layers/vending_machine/mug-saucer.svg" + }, + { + "if": "vending=water", + "then": "circle:white;./assets/layers/id_presets/temaki-water_bottle.svg" + }, + { + "if": "vending=newspapers", + "then": "circle:white;./assets/layers/id_presets/fas-newspaper.svg" + }, + { + "if": "vending=milk", + "then": "circle:white;./assets/layers/vending_machine/cow.svg" + }, + { + "if": "vending=bread", + "then": "circle:white;./assets/layers/id_presets/maki-bakery.svg" + }, + { + "if": "vending=eggs", + "then": "circle:white;./assets/layers/vending_machine/egg.svg" + }, + { + "if": "vending=cheese", + "then": "circle:white;./assets/layers/id_presets/fas-cheese.svg" + } + ] + }, + "location": [ + "point", + "centroid" + ], + "iconBadges": [ + { + "if": "opening_hours~*", + "then": "icons.isOpen" + }, + { + "if": { + "and": [ + "_vending_count>1", + "vending~.*drinks.*" + ] + }, + "then": "circle:white;./assets/layers/id_presets/temaki-bottles.svg" + }, + { + "if": { + "and": [ + "_vending_count>1", + "vending~.*sweets.*" + ] + }, + "then": "circle:white;./assets/layers/id_presets/maki-confectionery.svg" + }, + { + "if": { + "and": [ + "_vending_count>1", + "vending~.*food.*" + ] + }, + "then": "circle:white;./assets/layers/vending_machine/utensils.svg" + }, + { + "if": { + "and": [ + "_vending_count>1", + "vending~.*cigarettes.*" + ] + }, + "then": "circle:white;./assets/layers/vending_machine/smoking.svg" + }, + { + "if": { + "and": [ + "_vending_count>1", + "vending~.*coffee.*" + ] + }, + "then": "circle:white;./assets/layers/vending_machine/mug-saucer.svg" + }, + { + "if": { + "and": [ + "_vending_count>1", + "vending~.*water.*" + ] + }, + "then": "circle:white;./assets/layers/id_presets/temaki-water_bottle.svg" + }, + { + "if": { + "and": [ + "_vending_count>1", + "vending~.*newspapers.*" + ] + }, + "then": "circle:white;./assets/layers/id_presets/fas-newspaper.svg" + }, + { + "if": { + "and": [ + "_vending_count>1", + "vending~.*milk.*" + ] + }, + "then": "circle:white;./assets/layers/vending_machine/cow.svg" + }, + { + "if": { + "and": [ + "_vending_count>1", + "vending~.*bread.*" + ] + }, + "then": "circle:white;./assets/layers/id_presets/maki-bakery.svg" + }, + { + "if": { + "and": [ + "_vending_count>1", + "vending~.*eggs.*" + ] + }, + "then": "circle:white;./assets/layers/vending_machine/egg.svg" + }, + { + "if": { + "and": [ + "_vending_count>1", + "vending~.*cheese.*" + ] + }, + "then": "circle:white;./assets/layers/id_presets/fas-cheese.svg" + } + ] + } + ], + "filter": [ + "open_now", + { + "id": "vending", + "options": [ + { + "question": { + "en": "All vending machines", + "nl": "Alle verkoopautomaten" + } + }, + { + "question": { + "en": "Sale of drinks", + "nl": "Verkoop van dranken" + }, + "osmTags": "vending~i~.*drinks.*" + }, + { + "question": { + "en": "Sale of sweets", + "nl": "Verkoop van snoep" + }, + "osmTags": "vending~i~.*sweets.*" + }, + { + "question": { + "en": "Sale of food", + "nl": "Verkoop van eten" + }, + "osmTags": "vending~i~.*food.*" + }, + { + "question": { + "en": "Sale of cigarettes", + "nl": "Verkoop van sigaretten" + }, + "osmTags": "vending~i~.*cigarettes.*" + }, + { + "question": { + "en": "Sale of condoms", + "nl": "Verkoop van condooms" + }, + "osmTags": "vending~i~.*condoms.*" + }, + { + "question": { + "en": "Sale of coffee", + "nl": "Verkoop van koffie" + }, + "osmTags": "vending~i~.*coffee.*" + }, + { + "question": { + "en": "Sale of water", + "nl": "Verkoop van water" + }, + "osmTags": "vending~i~.*water.*" + }, + { + "question": { + "en": "Sale of newspapers", + "nl": "Verkoop van kranten" + }, + "osmTags": "vending~i~.*newspapers.*" + }, + { + "question": { + "en": "Sale of bicycle inner tubes", + "nl": "Verkoop van fietsbinnenbanden" + }, + "osmTags": "vending~i~.*bicycle_tube.*" + }, + { + "question": { + "en": "Sale of milk", + "nl": "Verkoop van melk" + }, + "osmTags": "vending~i~.*milk.*" + }, + { + "question": { + "en": "Sale of bread", + "nl": "Verkoop van brood" + }, + "osmTags": "vending~i~.*bread.*" + }, + { + "question": { + "en": "Sale of eggs", + "nl": "Verkoop van eieren" + }, + "osmTags": "vending~i~.*eggs.*" + }, + { + "question": { + "en": "Sale of cheese", + "nl": "Verkoop van kaas" + }, + "osmTags": "vending~i~.*cheese.*" + } + ] + } + ] +} \ No newline at end of file diff --git a/assets/layers/vending_machine/vending_machine.svg b/assets/layers/vending_machine/vending_machine.svg new file mode 100644 index 000000000..caee03014 --- /dev/null +++ b/assets/layers/vending_machine/vending_machine.svg @@ -0,0 +1,1202 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/themes/mapcomplete-changes/mapcomplete-changes.json b/assets/themes/mapcomplete-changes/mapcomplete-changes.json index f82a92086..610733fa1 100644 --- a/assets/themes/mapcomplete-changes/mapcomplete-changes.json +++ b/assets/themes/mapcomplete-changes/mapcomplete-changes.json @@ -406,6 +406,10 @@ "if": "theme=uk_addresses", "then": "./assets/themes/uk_addresses/housenumber_unknown.svg" }, + { + "if": "theme=vending_machine", + "then": "./assets/layers/vending_machine/vending_machine.svg" + }, { "if": "theme=walls_and_buildings", "then": "./assets/layers/walls_and_buildings/walls_and_buildings.png" diff --git a/assets/themes/vending_machine/vending_machine.json b/assets/themes/vending_machine/vending_machine.json new file mode 100644 index 000000000..e56f2b26e --- /dev/null +++ b/assets/themes/vending_machine/vending_machine.json @@ -0,0 +1,18 @@ +{ + "id": "vending_machine", + "title": { + "en": "Vending Machines", + "nl": "Verkoopautomaten" + }, + "description": { + "en": "Find vending machines for everything", + "nl": "Vind verkoopautomaten voor alles" + }, + "icon": "./assets/layers/vending_machine/vending_machine.svg", + "startLat": 53.21102, + "startLon": 6.56511, + "startZoom": 19, + "layers": [ + "vending_machine" + ] +} \ No newline at end of file From 5c9a7f6aaa5add2e2082bd4e604fcdd4b8dc86be Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Sun, 9 Jul 2023 18:37:39 +0200 Subject: [PATCH 2/3] Remove elongated_coin from vending_machine --- assets/layers/vending_machine/vending_machine.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/layers/vending_machine/vending_machine.json b/assets/layers/vending_machine/vending_machine.json index 764ab0692..06333e18b 100644 --- a/assets/layers/vending_machine/vending_machine.json +++ b/assets/layers/vending_machine/vending_machine.json @@ -12,7 +12,7 @@ "osmTags": { "and": [ "amenity=vending_machine", - "vending!~(parking_tickets|public_transport_tickets|bottle_return|excrement_bags)" + "vending!~(parking_tickets|public_transport_tickets|bottle_return|excrement_bags|elongated_coin)" ] } }, From ac19409481ed3995075ff137216dc80cf774041c Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Sun, 9 Jul 2023 20:28:33 +0200 Subject: [PATCH 3/3] Add two icons, enable deletion and move --- assets/layers/vending_machine/honey.svg | 272 ++++++++++++++++++ .../layers/vending_machine/license_info.json | 21 ++ assets/layers/vending_machine/potato.svg | 1 + .../vending_machine/vending_machine.json | 91 +++++- 4 files changed, 384 insertions(+), 1 deletion(-) create mode 100644 assets/layers/vending_machine/honey.svg create mode 100644 assets/layers/vending_machine/potato.svg diff --git a/assets/layers/vending_machine/honey.svg b/assets/layers/vending_machine/honey.svg new file mode 100644 index 000000000..3b9e34ba4 --- /dev/null +++ b/assets/layers/vending_machine/honey.svg @@ -0,0 +1,272 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +