Pubs and cafes

This commit is contained in:
pietervdvn 2021-09-08 17:33:00 +02:00
parent 37f27bf58f
commit 907f58c56b
7 changed files with 268 additions and 27 deletions

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="16"
height="16"
viewBox="0 0 16 16"
id="svg2">
<metadata id="metadata8">
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<defs id="defs6"/>
<rect width="16" height="16" x="0" y="0" id="canvas" style="fill:none;stroke:none;visibility:hidden"/>
<path d="M 1,1 1,7 C 1,9 3,10 5.5,10 8,10 10,9 10,7 l 2,0 c 1,0 2,-1 2,-2 L 14,4 C 14,3 13,2 12,2 l -2,0 0,-1 z m 9,2.25 1.75,0 c 0.667788,0 1,0.5628359 1,1.25 0,0.6871641 -0.388201,1.25 -1,1.25 L 10,5.75 z M 0,11 c 0,1 1,2 2,2 l 7,0 c 1,0 2,-1 2,-2 z" id="cafe" style="fill:#C77400;fill-opacity:1;stroke:none" transform="translate(1,1)"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -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": "<div style='background: white; padding: 0.25em; border-radius:0.5em'>{name}</div>"
}
]
},
"presets": [
],
"title": {
"render": {
"nl": "Café"
},
"mappings": [
{
"if": {
"and": [
"name~*"
]
},
"then": {
"nl": "<i>{name}</i>",
"en": "<i>{name}</i>"
}
}
]
},
"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 <b>een bruin café of een kroeg</b> waar voornamelijk bier wordt gedronken. De inrichting is typisch gezellig met veel houtwerk "
}
},
{
"if": "amenity=bar",
"then": {
"nl": "Dit is een <b>bar</b> 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 <b>cafe</b> - een plaats waar men rustig kan zitten om een thee, koffie of alcoholische drank te nuttigen."
}
},
{
"if": "amenity=restaurant",
"then": {
"nl": "Dit is een <b>restaurant</b> 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"
}
]
}
]
}

View file

@ -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"
]
}
]

View file

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="16"
height="16"
viewBox="0 0 16 16"
id="svg2">
<metadata id="metadata8">
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<defs id="defs6"/>
<rect width="16" height="16" x="0" y="0" id="canvas" style="fill:none;stroke:none;visibility:hidden"/>
<path d="m 2,1 2,12 6,0 2,-12 z m 1.25,1 7.5,0 -0.33,2 -6.86,0 z"
id="pub"
style="fill:#C77400;fill-opacity:1;stroke:none" transform="translate(1,1)"/>
</svg>

After

Width:  |  Height:  |  Size: 920 B

View file

@ -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": [

View file

@ -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~*",

View file

@ -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"
]
}