From e889d1eff1a8f1ca5456f961fb286be68f48c243 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Tue, 7 Sep 2021 00:22:39 +0200 Subject: [PATCH] Reuse the food layer in the friture theme, add the general food layer at zoom level 19 to prevent duplicates, fixes #319 --- assets/layers/food/food.json | 2 +- assets/themes/fritures/fritures.json | 335 ++------------------------- 2 files changed, 26 insertions(+), 311 deletions(-) diff --git a/assets/layers/food/food.json b/assets/layers/food/food.json index 31b8fefd1..c762d8f82 100644 --- a/assets/layers/food/food.json +++ b/assets/layers/food/food.json @@ -322,7 +322,7 @@ ] }, { - "#": "Vegetarion (no friture)", + "#": "Vegetarian (no friture)", "question": { "nl": "Heeft deze eetgelegenheid een vegetarische optie?", "en": "Does this restaurant have a vegetarian option?" diff --git a/assets/themes/fritures/fritures.json b/assets/themes/fritures/fritures.json index 53e8bad9d..33d83c0f5 100644 --- a/assets/themes/fritures/fritures.json +++ b/assets/themes/fritures/fritures.json @@ -28,320 +28,35 @@ "socialImage": "", "layers": [ { - "id": "fritures", - "name": { - "nl": "Frituren", - "fr": "Friteries" - }, - "minzoom": 8, - "source": { - "osmTags": { - "and": [ - "cuisine~.*friture.*" - ] - } - }, - "title": { - "render": { - "nl": "Frituur", - "fr": "Friterie" + "builtin": "food", + "override": { + "id": "friture", + "name": { + "nl": "Frituren", + "en": "Fries shop", + "fr": "Friteries" }, - "mappings": [ - { - "if": { - "and": [ - "name~*" - ] - }, - "then": { - "nl": " {name}", - "fr": " {name}" - } - } - ] - }, - "titleIcons": [ - { - "condition": { - "or": [ - "diet:vegetarian=yes", - "diet:vegan=yes" + "source": { + "osmTags": { + "and": [ + "cuisine=friture", + { + "or": [ + "amenity=fast_food", + "amenity=restaurant" + ] + } ] - }, - "render": "" - }, - "defaults" - ], - "tagRenderings": [ - "images", - { - "render": { - "nl": "{name}", - "fr": "{name}" - }, - "question": { - "en": "What is the name of this friture?", - "nl": "Wat is de naam van deze frituur?", - "fr": "Quel est le nom de cette friterie?", - "ja": "このfritureは何という名前ですか?" - }, - "freeform": { - "key": "name" } - }, - { - "render": { - "nl": "

Openingsuren

{opening_hours_table(opening_hours)}", - "fr": "

Horaires

{opening_hours_table(opening_hours)}" - }, - "question": { - "nl": "Wat zijn de openinguren van deze frituur?", - "fr": "Quand est ce-que ce friterie ouvert?" - }, - "freeform": { - "key": "opening_hours", - "type": "opening_hours" - } - }, - { - "render": { - "en": "{website}", - "ca": "{website}", - "fr": "{website}", - "id": "{website}", - "ru": "{website}", - "ja": "{website}", - "it": "{website}" - }, - "question": { - "en": "What is the website of this shop?", - "nl": "Wat is de website van deze frituur?", - "fr": "Quel est le site web de cette friterie?", - "ja": "このお店のホームページは何ですか?", - "it": "Qual è il sito web di questo negozio?", - "ru": "Какой веб-сайт у этого магазина?" - }, - "freeform": { - "key": "website", - "type": "url" - } - }, - { - "render": { - "nl": "{phone}", - "fr": "{phone}" - }, - "question": { - "en": "What is the phone number?", - "nl": "Wat is het telefoonnummer van deze frituur?", - "fr": "Quel est le numéro de téléphone de cette friterie?", - "ja": "電話番号は何番ですか?", - "nb_NO": "Hva er telefonnummeret?", - "it": "Qual è il numero di telefono?", - "ru": "Какой телефон?" - }, - "freeform": { - "key": "phone", - "type": "phone" - } - }, - { - "question": { - "nl": "Heeft deze frituur vegetarische snacks?", - "fr": "Cette friterie est-elle équipée de snacks végétariens ?" - }, - "mappings": [ - { - "if": { - "and": [ - "diet:vegetarian=yes" - ] - }, - "then": { - "nl": "Er zijn vegetarische snacks aanwezig", - "fr": "Des collations végétariennes sont disponibles" - } - }, - { - "if": { - "and": [ - "diet:vegetarian=limited" - ] - }, - "then": { - "nl": "Slechts enkele vegetarische snacks", - "fr": "Quelques snacks végétariens seulement" - } - }, - { - "if": { - "and": [ - "diet:vegetarian=no" - ] - }, - "then": { - "nl": "Geen vegetarische snacks beschikbaar", - "fr": "Pas d'en-cas végétariens disponibles" - } - } - ] - }, - { - "question": { - "nl": "Heeft deze frituur veganistische snacks?", - "fr": "Cette friterie est-elle équipée de snacks végétaliens ?" - }, - "mappings": [ - { - "if": { - "and": [ - "diet:vegan=yes" - ] - }, - "then": { - "nl": "Er zijn veganistische snacks aanwezig", - "fr": "Des collations végétaliens sont disponibles" - } - }, - { - "if": { - "and": [ - "diet:vegan=limited" - ] - }, - "then": { - "nl": "Slechts enkele veganistische snacks", - "fr": "Quelques snacks végétaliens seulement" - } - }, - { - "if": { - "and": [ - "diet:vegetarian=no" - ] - }, - "then": { - "nl": "Geen veganistische snacks beschikbaar", - "fr": "Pas d'en-cas végétaliens disponibles" - } - } - ] - }, - { - "question": { - "nl": "Bakt deze frituur met dierlijk vet of met plantaardige olie?", - "fr": "Cette friteuse fonctionne-t-elle avec de la graisse animale ou végétale ?" - }, - "mappings": [ - { - "if": { - "and": [ - "friture:oil=vegetable" - ] - }, - "then": { - "nl": "Plantaardige olie", - "fr": "Huile végétale" - } - }, - { - "if": { - "and": [ - "friture:oil=animal" - ] - }, - "then": { - "nl": "Dierlijk vet", - "fr": "Graisse animale" - } - } - ] - }, - { - "question": { - "nl": "Als je je eigen container (bv. kookpot of kleine potjes voor saus) meeneemt, gebruikt de frituur deze dan om je bestelling in te doen?", - "en": "If you bring your own container (such as a cooking pot and small pots), is it used to package your order?
", - "ja": "お客様が持参容器(調理用の鍋や小さな鍋など)をもってきた場合は、注文の梱包に使用されますか?
", - "fr": "Est-il proposé d’utiliser ses propres contenants pour sa commande ?
" - }, - "mappings": [ - { - "if": "reusable_packaging:accept=yes", - "then": { - "nl": "Je mag je eigen containers meenemen om je bestelling in mee te nemen en zo minder afval te maken", - "en": "You can bring your own containers to get your order, saving on single-use packaging material and thus waste", - "ja": "自分の容器を持ってきて、注文を受け取ることができ、使い捨ての梱包材を節約して、無駄を省くことができます", - "fr": "Vous pouvez apporter vos contenants pour votre commande, limitant l’usage de matériaux à usage unique et les déchets" - } - }, - { - "if": "reusable_packaging:accept=no", - "then": { - "nl": "Je mag geen eigen containers meenemen om je bestelling in mee te nemen", - "en": "Bringing your own container is not allowed", - "ja": "独自の容器を持参することはできません", - "ru": "Приносить свою тару не разрешено", - "fr": "Apporter ses propres contenants n’est pas permis" - } - }, - { - "if": "reusable_packaging:accept=only", - "then": { - "nl": "Je moet je eigen containers meenemen om je bestelling in mee te nemen.", - "en": "You must bring your own container to order here.", - "ja": "自身の容器が注文に必要。", - "fr": "Il est obligatoire d’apporter ses propres contenants" - } - } - ] - }, - "questions", - "reviews" - ], - "icon": { - "render": "./assets/themes/fritures/fries.svg" - }, - "iconOverlays": [ - { - "if": "opening_hours~*", - "then": "isOpen", - "badge": true - }, - { - "if": { - "or": [ - "diet:vegetarian=yes", - "diet:vegan=yes" - ] - }, - "then": { - "render": "circle:white;./assets/themes/fritures/Vegetarian-mark.svg" - }, - "badge": true } - ], - "width": { - "render": "8" - }, - "iconSize": { - "render": "40,40,center" - }, - "color": { - "render": "#00f" - }, - "presets": [ - { - "title": { - "nl": "Frituur", - "fr": "Friturie" - }, - "tags": [ - "amenity=fast_food", - "cuisine=friture" - ] - } - ], - "wayHandling": 1 + } + }, + { + "builtin": "food", + "override": { + "minzoom": 19, + "filter": null + } } ], "roamingRenderings": []