From c2bbae98e1cd18800341fd24d8640a510edd2cd8 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 19 Jul 2024 16:14:48 +0200 Subject: [PATCH] Add lactose free map, add icons to questions and titles, version bump --- assets/layers/icons/icons.json | 31 +++++ .../questions}/glutenfree.svg | 0 .../layers/questions/glutenfree.svg.license | 2 + assets/layers/questions/lactose_free.svg | 70 ++++++++++++ .../layers/questions/lactose_free.svg.license | 2 + assets/layers/questions/license_info.json | 20 ++++ assets/layers/questions/questions.json | 14 ++- assets/themes/glutenfree/glutenfree.json | 2 +- assets/themes/glutenfree/license_info.json | 12 -- assets/themes/lactosefree/lactosefree.json | 107 ++++++++++++++++++ .../mapcomplete-changes.json | 10 +- package.json | 2 +- 12 files changed, 249 insertions(+), 23 deletions(-) rename assets/{themes/glutenfree => layers/questions}/glutenfree.svg (100%) create mode 100644 assets/layers/questions/glutenfree.svg.license create mode 100644 assets/layers/questions/lactose_free.svg create mode 100644 assets/layers/questions/lactose_free.svg.license delete mode 100644 assets/themes/glutenfree/license_info.json create mode 100644 assets/themes/lactosefree/lactosefree.json diff --git a/assets/layers/icons/icons.json b/assets/layers/icons/icons.json index 83f0075bb..900c7c40b 100644 --- a/assets/layers/icons/icons.json +++ b/assets/layers/icons/icons.json @@ -256,6 +256,37 @@ } ] }, + {"id": "lactosefree", + "labels": [ + "defaults", + "in_favourite" + ], + "mappings": [ + { + "if": { + "or":["diet:lactose_free=only","diet:lactose_free=yes","diet:lactose_free=limited"] + }, + "#": "ignore-image-in-then", + "then": "lactose free" + } + ] + }, + {"id": "glutenfree", + "labels": [ + "defaults", + "in_favourite" + ], + "mappings": [ + { + "if": { + "or":["diet:gluten_free=only","diet:gluten_free=yes","diet:gluten_free=limited"] + }, + "#": "ignore-image-in-then", + "then": "gluten free" + } + ] + }, + { "id": "sharelink", "labels": [ diff --git a/assets/themes/glutenfree/glutenfree.svg b/assets/layers/questions/glutenfree.svg similarity index 100% rename from assets/themes/glutenfree/glutenfree.svg rename to assets/layers/questions/glutenfree.svg diff --git a/assets/layers/questions/glutenfree.svg.license b/assets/layers/questions/glutenfree.svg.license new file mode 100644 index 000000000..858e45e6b --- /dev/null +++ b/assets/layers/questions/glutenfree.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: vladi1081384728 +SPDX-License-Identifier: CC-BY-SA-4.0 \ No newline at end of file diff --git a/assets/layers/questions/lactose_free.svg b/assets/layers/questions/lactose_free.svg new file mode 100644 index 000000000..3693bdf39 --- /dev/null +++ b/assets/layers/questions/lactose_free.svg @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + diff --git a/assets/layers/questions/lactose_free.svg.license b/assets/layers/questions/lactose_free.svg.license new file mode 100644 index 000000000..305d4e513 --- /dev/null +++ b/assets/layers/questions/lactose_free.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: rihlsul +SPDX-License-Identifier: CC-BY 3.0 \ No newline at end of file diff --git a/assets/layers/questions/license_info.json b/assets/layers/questions/license_info.json index 88c1bec03..c36d3502c 100644 --- a/assets/layers/questions/license_info.json +++ b/assets/layers/questions/license_info.json @@ -71,6 +71,26 @@ "https://github.com/pietervdvn/MapComplete/pull/1948" ] }, + { + "path": "glutenfree.svg", + "license": "CC-BY-SA-4.0", + "authors": [ + "vladi1081384728" + ], + "sources": [ + "https://www.vecteezy.com/vector-art/7225296-gluten-free-vector-label" + ] + }, + { + "path": "lactose_free.svg", + "license": "CC-BY 3.0", + "authors": [ + "rihlsul" + ], + "sources": [ + "https://game-icons.net/1x1/rihlsul/milk-carton.html" + ] + }, { "path": "nfc_card.svg", "license": "CC0-1.0", diff --git a/assets/layers/questions/questions.json b/assets/layers/questions/questions.json index 38dfa9b3a..dacaf02d8 100644 --- a/assets/layers/questions/questions.json +++ b/assets/layers/questions/questions.json @@ -2475,7 +2475,9 @@ "en": "Only sells lactose free products", "de": "Ausschließlich laktosefreie Produkte", "cs": "Prodává pouze výrobky bez laktózy" - } + }, + "icon": "./assets/layers/questions/lactose_free.svg" + }, { "if": "diet:lactose_free=yes", @@ -2483,7 +2485,9 @@ "en": "Big lactose free offering", "de": "Viele laktosefreie Produkte", "cs": "Velká nabídka bez laktózy" - } + }, + "icon": "./assets/layers/questions/lactose_free.svg" + }, { "if": "diet:lactose_free=limited", @@ -2522,7 +2526,8 @@ "en": "This shop only sells gluten free products", "de": "Das Geschäft verkauft ausschließlich glutenfreie Produkte", "cs": "Tento obchod prodává pouze bezlepkové produkty" - } + }, + "icon": "./assets/layers/questions/glutenfree.svg" }, { "if": "diet:gluten_free=yes", @@ -2530,7 +2535,8 @@ "en": "This shop has a big gluten free offering", "de": "Das Geschäft verkauft viele glutenfreie Produkte", "cs": "Tento obchod má velkou bezlepkovou nabídku" - } + }, + "icon": "./assets/layers/questions/glutenfree.svg" }, { "if": "diet:gluten_free=limited", diff --git a/assets/themes/glutenfree/glutenfree.json b/assets/themes/glutenfree/glutenfree.json index bb2fa2550..a4ddf92d3 100644 --- a/assets/themes/glutenfree/glutenfree.json +++ b/assets/themes/glutenfree/glutenfree.json @@ -6,7 +6,7 @@ "description": { "en": "A crowdsourced map with glutenfree items" }, - "icon": "./assets/themes/glutenfree/glutenfree.svg", + "icon": "./assets/layers/questions/glutenfree.svg", "layers": [ { "builtin": "food", diff --git a/assets/themes/glutenfree/license_info.json b/assets/themes/glutenfree/license_info.json deleted file mode 100644 index 000deb31b..000000000 --- a/assets/themes/glutenfree/license_info.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "path": "glutenfree.svg", - "license": "CC-BY-SA-4.0", - "authors": [ - "vladi1081384728" - ], - "sources": [ - "https://www.vecteezy.com/vector-art/7225296-gluten-free-vector-label" - ] - } -] \ No newline at end of file diff --git a/assets/themes/lactosefree/lactosefree.json b/assets/themes/lactosefree/lactosefree.json new file mode 100644 index 000000000..8b77065c9 --- /dev/null +++ b/assets/themes/lactosefree/lactosefree.json @@ -0,0 +1,107 @@ +{ + "id": "lactosefree", + "title": { + "en": "Lactose free shops and restaurants" + }, + "description": { + "en": "A crowdsourced map with lactose free shops and restaurants" + }, + "icon": "./assets/layers/questions/lactose_free.svg", + "layers": [ + { + "builtin": "food", + "hideTagRenderingsWithLabels": ["lactose_free","images","reviews"], + "override": { + "source": { + "osmTags": { + "and+": [ + "diet:lactose_free!=", + "diet:lactose_free!~no" + ] + } + }, + "id": "food_lactosefree", + "minzoom": 4, + "presets": null + } + }, + { + "builtin": "food", + "hideTagRenderingsWithLabels": ["lactose_free","images","reviews"], + "override": { + "name": null, + "minzoom": 17, + + "isCounted": false, + "filter": { + "sameAs": "food_lactosefree" + } + } + }, + { + "builtin": "ice_cream", + "hideTagRenderingsWithLabels": ["lactose_free","images","reviews"], + "override": { + "source": { + "osmTags": { + "and+": [ + "diet:lactose_free!=", + "diet:lactose_free!~no" + ] + } + }, + "id": "icecream_lactosefree", + "minzoom": 4, + "presets": null + } + }, + { + "builtin": "ice_cream", + "hideTagRenderingsWithLabels": ["lactose_free","images","reviews"], + "override": { + "name": null, + "minzoom": 17, + "isCounted": false, + "filter": { + "sameAs": "icecream_lactosefree" + } + } + }, + { + "builtin": "shops", + "hideTagRenderingsWithLabels": ["lactose_free","images","reviews"], + "override": { + "source": { + "osmTags": { + "and+": [ + "diet:lactose_free!=", + "diet:lactose_free!~no" + ] + } + }, + "id": "shops_lactosefree", + "minzoom": 4, + "presets": null + } + }, + { + "builtin": "shops", + "hideTagRenderingsWithLabels": ["lactose_free","images","reviews"], + "override": { + "name": null, + "minzoom": 17, + "isCounted": false, + "filter": { + "sameAs": "shops_lactosefree" + } + } + } + ], + "overrideAll": { + "+tagRenderings": [ + "images", + "reviews", + "lactose_free" + ] + } +} diff --git a/assets/themes/mapcomplete-changes/mapcomplete-changes.json b/assets/themes/mapcomplete-changes/mapcomplete-changes.json index fe87d0a9e..2518682c9 100644 --- a/assets/themes/mapcomplete-changes/mapcomplete-changes.json +++ b/assets/themes/mapcomplete-changes/mapcomplete-changes.json @@ -263,7 +263,7 @@ }, { "if": "theme=glutenfree", - "then": "./assets/themes/glutenfree/glutenfree.svg" + "then": "./assets/layers/questions/glutenfree.svg" }, { "if": "theme=grb", @@ -306,12 +306,12 @@ "then": "./assets/layers/kerbs/KerbIcon.svg" }, { - "if": "theme=lighthouses", - "then": "./assets/themes/lighthouses/lighthouse.svg" + "if": "theme=lactosefree", + "then": "./assets/layers/questions/lactose_free.svg" }, { - "if": "theme=mapcomplete-changes", - "then": "./assets/svg/logo.svg" + "if": "theme=lighthouses", + "then": "./assets/themes/lighthouses/lighthouse.svg" }, { "if": "theme=maproulette", diff --git a/package.json b/package.json index 12f573727..9f5d0e7ab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mapcomplete", - "version": "0.44.9", + "version": "0.44.10", "repository": "https://github.com/pietervdvn/MapComplete", "description": "A small website to edit OSM easily", "bugs": "https://github.com/pietervdvn/MapComplete/issues",