From 907f58c56bf714325c6a9ffbc9a65dc77ca944f7 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Wed, 8 Sep 2021 17:33:00 +0200 Subject: [PATCH] Pubs and cafes --- assets/layers/cafe_pub/cafe.svg | 25 ++++ assets/layers/cafe_pub/cafe_pub.json | 138 ++++++++++++++++++ assets/layers/cafe_pub/license_info.json | 22 +++ assets/layers/cafe_pub/pub.svg | 27 ++++ assets/layers/food/food.json | 32 +--- assets/tagRenderings/questions.json | 25 ++++ .../themes/cafes_and_pubs/cafes_and_pubs.json | 26 ++++ 7 files changed, 268 insertions(+), 27 deletions(-) create mode 100644 assets/layers/cafe_pub/cafe.svg create mode 100644 assets/layers/cafe_pub/cafe_pub.json create mode 100644 assets/layers/cafe_pub/license_info.json create mode 100644 assets/layers/cafe_pub/pub.svg create mode 100644 assets/themes/cafes_and_pubs/cafes_and_pubs.json diff --git a/assets/layers/cafe_pub/cafe.svg b/assets/layers/cafe_pub/cafe.svg new file mode 100644 index 000000000..ab4976494 --- /dev/null +++ b/assets/layers/cafe_pub/cafe.svg @@ -0,0 +1,25 @@ + + + + + + image/svg+xml + + + + + + + + + diff --git a/assets/layers/cafe_pub/cafe_pub.json b/assets/layers/cafe_pub/cafe_pub.json new file mode 100644 index 000000000..51bacbb13 --- /dev/null +++ b/assets/layers/cafe_pub/cafe_pub.json @@ -0,0 +1,138 @@ +{ + "id": "cafe_pub", + "name": { + "nl": "Cafés", + "en": "Cafés and pubs" + }, + "source": { + "osmTags": { + "or": [ + "amenity=bar", + "amenity=pub", + "amenity=cafe", + "amenity=biergarten" + ] + } + }, + "wayHandling": 1, + "icon": { + "render": "circle:white;./assets/layers/cafe_pub/pub.svg", + "mappings": [ + { + "if": "amenity=cafe", + "then": "circle:white;./assets/layers/cafe_pub/cafe.svg" + } + ] + }, + "iconOverlays": [ + { + "if": "opening_hours~*", + "then": "isOpen", + "badge": true + } + ], + "label": { + "mappings": [ + { + "if": "name~*", + "then": "
{name}
" + } + ] + }, + "presets": [ + ], + "title": { + "render": { + "nl": "Café" + }, + "mappings": [ + { + "if": { + "and": [ + "name~*" + ] + }, + "then": { + "nl": "{name}", + "en": "{name}" + } + } + ] + }, + "tagRenderings": [ + "images", + { + "#": "Name", + "question": { + "nl": "Wat is de naam van dit café?", + "en": "What is the name of this pub?" + }, + "render": { + "nl": "De naam van dit café is {name}", + "en": "This pub is named {name}" + }, + "freeform": { + "key": "name" + } + }, + { + "#": "Classification", + "question": { + "en": "What kind of cafe is this", + "nl": "Welk soort café is dit?" + }, + "mappings": [ + { + "if": "amenity=pub", + "then": { + "nl": "Dit is een bruin café of een kroeg waar voornamelijk bier wordt gedronken. De inrichting is typisch gezellig met veel houtwerk " + } + }, + { + "if": "amenity=bar", + "then": { + "nl": "Dit is een bar waar men ter plaatse alcoholische drank nuttigt. De inrichting is typisch modern en commercieel, soms met lichtinstallatie en feestmuziek" + } + }, + { + "if": "amenity=cafe", + "then": { + "nl": "Dit is een cafe - een plaats waar men rustig kan zitten om een thee, koffie of alcoholische drank te nuttigen." + } + }, + { + "if": "amenity=restaurant", + "then": { + "nl": "Dit is een restaurant waar men een maaltijd geserveerd krijgt" + } + }, + { + "if": "amenity=biergarten", + "then": { + "nl": "Een open ruimte waar bier geserveerd wordt. Typisch in Duitsland" + }, + "hideInAnswer": "_country!=de" + } + ] + }, + "opening_hours", + "website", + "email", + "phone", + "payment-options", + "wheelchair-access" + ], + "filter": [ + { + "options": [ + { + "question": { + "en": "Opened now", + "nl": "Nu geopened" + }, + "osmTags": "_isOpen=yes" + } + ] + } + ] +} \ No newline at end of file diff --git a/assets/layers/cafe_pub/license_info.json b/assets/layers/cafe_pub/license_info.json new file mode 100644 index 000000000..dd4798197 --- /dev/null +++ b/assets/layers/cafe_pub/license_info.json @@ -0,0 +1,22 @@ +[ + { + "path": "cafe.svg", + "license": "CC0", + "authors": [ + "OSM Carto" + ], + "sources": [ + "https://wiki.openstreetmap.org/wiki/File:Cafe-16.svg" + ] + }, + { + "path": "pub.svg", + "license": "CC0", + "authors": [ + "OSM Carto" + ], + "sources": [ + "https://wiki.openstreetmap.org/wiki/File:Pub-16.svg" + ] + } +] \ No newline at end of file diff --git a/assets/layers/cafe_pub/pub.svg b/assets/layers/cafe_pub/pub.svg new file mode 100644 index 000000000..7b3b556cc --- /dev/null +++ b/assets/layers/cafe_pub/pub.svg @@ -0,0 +1,27 @@ + + + + + + image/svg+xml + + + + + + + + + diff --git a/assets/layers/food/food.json b/assets/layers/food/food.json index e91626704..9dcb0f1dd 100644 --- a/assets/layers/food/food.json +++ b/assets/layers/food/food.json @@ -144,10 +144,12 @@ { "#": "Name", "question": { - "nl": "Wat is de naam van deze eetgelegenheid?" + "nl": "Wat is de naam van deze eetgelegenheid?", + "en": "What is the name of this restaurant?" }, "render": { - "nl": "De naam van deze eetgelegeheid is {name}" + "nl": "De naam van deze eetgelegeheid is {name}", + "en": "The name of this restaurant is {name}" }, "freeform": { "key": "name" @@ -178,6 +180,7 @@ "website", "email", "phone", + "payment-options", "wheelchair-access", { "#": "Cuisine", @@ -547,31 +550,6 @@ } ], "condition": "cuisine=friture" - }, - { - "question": { - "en": "Which methods of payment are accepted here?", - "nl": "Welke betaalmiddelen worden hier geaccepteerd?" - }, - "multiAnswer": true, - "mappings": [ - { - "if": "payment:cash=yes", - "ifnot": "payment:cash=no", - "then": { - "en": "Cash is accepted here", - "nl": "Cash geld wordt hier aanvaard" - } - }, - { - "if": "payment:cards=yes", - "ifnot": "payment:cards=no", - "then": { - "en": "Payment cards are accepted here", - "nl": "Betalen met bankkaarten kan hier" - } - } - ] } ], "filter": [ diff --git a/assets/tagRenderings/questions.json b/assets/tagRenderings/questions.json index e881c05e5..44c56a372 100644 --- a/assets/tagRenderings/questions.json +++ b/assets/tagRenderings/questions.json @@ -187,6 +187,31 @@ "type": "opening_hours" } }, + "payment-options": { + "question": { + "en": "Which methods of payment are accepted here?", + "nl": "Welke betaalmiddelen worden hier geaccepteerd?" + }, + "multiAnswer": true, + "mappings": [ + { + "if": "payment:cash=yes", + "ifnot": "payment:cash=no", + "then": { + "en": "Cash is accepted here", + "nl": "Cash geld wordt hier aanvaard" + } + }, + { + "if": "payment:cards=yes", + "ifnot": "payment:cards=no", + "then": { + "en": "Payment cards are accepted here", + "nl": "Betalen met bankkaarten kan hier" + } + } + ] + }, "last_edit": { "#": "Gives some metainfo about the last edit and who did edit it - rendering only", "condition": "_last_edit:contributor~*", diff --git a/assets/themes/cafes_and_pubs/cafes_and_pubs.json b/assets/themes/cafes_and_pubs/cafes_and_pubs.json new file mode 100644 index 000000000..1f9b704f8 --- /dev/null +++ b/assets/themes/cafes_and_pubs/cafes_and_pubs.json @@ -0,0 +1,26 @@ +{ + "id": "cafes_and_pubs", + "title": { + "nl": "Cafés", + "en": "Cafés and pubs" + }, + "description": { + "nl": "Cafés, kroegen en drinkgelegenheden" + }, + "language": [ + "nl", + "fr", + "en" + ], + "maintainer": "", + "icon": "./assets/layers/cafe_pub/pub.svg", + "version": "0", + "startLat": 0, + "startLon": 0, + "startZoom": 1, + "widenFactor": 0.05, + "socialImage": "", + "layers": [ + "cafe_pub" + ] +} \ No newline at end of file