From f35f326004415603bafe1551882d0636f2ba7bab Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Mon, 15 Apr 2024 01:37:44 +0200 Subject: [PATCH] Basic food court and outdoor seating layer (#1845) --- assets/layers/bike_shop/bike_shop.json | 5 +- assets/layers/food_courts/food_court.svg | 7 + .../layers/food_courts/food_court.svg.license | 2 + assets/layers/food_courts/food_courts.json | 76 ++++++++ assets/layers/food_courts/license_info.json | 10 + .../layers/outdoor_seating/license_info.json | 12 ++ .../outdoor_seating/outdoor_seating.json | 174 ++++++++++++++++++ .../outdoor_seating/outdoor_seating.svg | 3 + .../outdoor_seating.svg.license | 2 + .../themes/cafes_and_pubs/cafes_and_pubs.json | 4 +- assets/themes/food/food.json | 6 +- 11 files changed, 297 insertions(+), 4 deletions(-) create mode 100644 assets/layers/food_courts/food_court.svg create mode 100644 assets/layers/food_courts/food_court.svg.license create mode 100644 assets/layers/food_courts/food_courts.json create mode 100644 assets/layers/food_courts/license_info.json create mode 100644 assets/layers/outdoor_seating/license_info.json create mode 100644 assets/layers/outdoor_seating/outdoor_seating.json create mode 100644 assets/layers/outdoor_seating/outdoor_seating.svg create mode 100644 assets/layers/outdoor_seating/outdoor_seating.svg.license diff --git a/assets/layers/bike_shop/bike_shop.json b/assets/layers/bike_shop/bike_shop.json index 0d6ae6524..757c3ae9c 100644 --- a/assets/layers/bike_shop/bike_shop.json +++ b/assets/layers/bike_shop/bike_shop.json @@ -281,7 +281,10 @@ }, { "if": { - "and":["service:bicycle:cleaning~*","service:bicycle:cleaning!=no"] + "and": [ + "service:bicycle:cleaning~*", + "service:bicycle:cleaning!=no" + ] }, "then": "circle:#6bc4f7;./assets/layers/bike_cleaning/bike_cleaning_icon.svg" } diff --git a/assets/layers/food_courts/food_court.svg b/assets/layers/food_courts/food_court.svg new file mode 100644 index 000000000..5339efbc3 --- /dev/null +++ b/assets/layers/food_courts/food_court.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/assets/layers/food_courts/food_court.svg.license b/assets/layers/food_courts/food_court.svg.license new file mode 100644 index 000000000..bb226dbab --- /dev/null +++ b/assets/layers/food_courts/food_court.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: OSM Carto +SPDX-License-Identifier: CC0-1.0 \ No newline at end of file diff --git a/assets/layers/food_courts/food_courts.json b/assets/layers/food_courts/food_courts.json new file mode 100644 index 000000000..bfaa854b0 --- /dev/null +++ b/assets/layers/food_courts/food_courts.json @@ -0,0 +1,76 @@ +{ + "id": "food_courts", + "name": { + "en": "Food Courts" + }, + "description": { + "en": "Food courts with a variety of food options." + }, + "title": { + "render": { + "en": "Food Court" + }, + "mappings": [ + { + "if": "name~*", + "then": "{name}" + } + ] + }, + "source": { + "osmTags": "amenity=food_court" + }, + "minzoom": 12, + "tagRenderings": [ + { + "id": "name", + "question": { + "en": "What is the name of this food court?" + }, + "freeform": { + "key": "name", + "type": "string", + "placeholder": { + "en": "Name of the food court" + } + }, + "render": { + "en": "This food court is called {name}." + } + }, + "reviews", + "images", + "opening_hours", + "wheelchair-access", + "website", + "phone", + "smoking" + ], + "pointRendering": [ + { + "location": [ + "point", + "centroid" + ], + "marker": [ + { + "icon": "./assets/layers/food_courts/food_court.svg" + } + ], + "label": { + "mappings": [ + { + "if": "name~*", + "then": "
{name}
" + } + ] + } + } + ], + "lineRendering": [ + { + "color": "#C77400", + "fillColor": "#C774004D" + } + ] +} \ No newline at end of file diff --git a/assets/layers/food_courts/license_info.json b/assets/layers/food_courts/license_info.json new file mode 100644 index 000000000..6c60b1953 --- /dev/null +++ b/assets/layers/food_courts/license_info.json @@ -0,0 +1,10 @@ +[ + { + "path": "food_court.svg", + "license": "CC0-1.0", + "authors": [ + "OSM Carto" + ], + "sources": [] + } +] \ No newline at end of file diff --git a/assets/layers/outdoor_seating/license_info.json b/assets/layers/outdoor_seating/license_info.json new file mode 100644 index 000000000..88d851378 --- /dev/null +++ b/assets/layers/outdoor_seating/license_info.json @@ -0,0 +1,12 @@ +[ + { + "path": "outdoor_seating.svg", + "license": "CC0-1.0", + "authors": [ + "Adamant36" + ], + "sources": [ + "https://github.com/gravitystorm/openstreetmap-carto/blob/master/symbols/leisure/outdoor_seating.svg" + ] + } +] \ No newline at end of file diff --git a/assets/layers/outdoor_seating/outdoor_seating.json b/assets/layers/outdoor_seating/outdoor_seating.json new file mode 100644 index 000000000..3bf1caeba --- /dev/null +++ b/assets/layers/outdoor_seating/outdoor_seating.json @@ -0,0 +1,174 @@ +{ + "id": "outdoor_seating", + "name": { + "en": "Outdoor Seating" + }, + "description": { + "en": "Outdoor seating areas, usually located near cafes and restaurants." + }, + "title": { + "render": { + "en": "Outdoor Seating area" + }, + "mappings": [ + { + "if": "name~*", + "then": "{name}" + } + ] + }, + "source": { + "osmTags": "leisure=outdoor_seating" + }, + "minzoom": 19, + "tagRenderings": [ + "images", + { + "id": "access", + "question": { + "en": "Who can use this outdoor seating area?" + }, + "mappings": [ + { + "if": "access=yes", + "then": { + "en": "Anyone can use this outdoor seating area." + } + }, + { + "if": "access=customers", + "then": { + "en": "Only customers can use this outdoor seating area." + } + }, + { + "if": "access=private", + "then": { + "en": "This outdoor seating area is private." + } + } + ] + }, + { + "id": "seasonal", + "question": { + "en": "Is this outdoor seating area seasonal?" + }, + "multiAnswer": true, + "mappings": [ + { + "if": "seasonal=no", + "then": { + "en": "This outdoor seating area is available all year round." + } + }, + { + "if": "seasonal=spring", + "then": { + "en": "This outdoor seating area is available in spring." + } + }, + { + "if": "seasonal=summer", + "then": { + "en": "This outdoor seating area is available in summer." + } + }, + { + "if": "seasonal=autumn", + "then": { + "en": "This outdoor seating area is available in autumn." + } + }, + { + "if": "seasonal=winter", + "then": { + "en": "This outdoor seating area is available in winter." + } + }, + { + "if": "seasonal=dry_season", + "then": { + "en": "This outdoor seating area is available in the dry season." + } + } + ] + }, + "opening_hours_24_7", + "website", + "internet-all", + "wheelchair-access", + { + "id": "heating", + "question": { + "en": "Is this outdoor seating area heated?" + }, + "mappings": [ + { + "if": "heating=yes", + "then": { + "en": "This outdoor seating area is heated." + } + }, + { + "if": "heating=no", + "then": { + "en": "This outdoor seating area is not heated." + } + } + ] + }, + { + "id": "covered", + "question": { + "en": "Is this outdoor seating area covered?" + }, + "mappings": [ + { + "if": "covered=yes", + "then": { + "en": "This outdoor seating area is covered." + } + }, + { + "if": "covered=no", + "then": { + "en": "This outdoor seating area is not covered." + } + } + ] + }, + { + "builtin": "smoking", + "override": { + "mappings": [ + {}, + {}, + { + "hideInAnswer": true + } + ] + } + } + ], + "pointRendering": [ + { + "location": [ + "point", + "centroid" + ], + "marker": [ + { + "icon": "./assets/layers/outdoor_seating/outdoor_seating.svg" + } + ] + } + ], + "lineRendering": [ + { + "color": "green", + "fillColor": "#00FF004D", + "width": 2 + } + ] +} \ No newline at end of file diff --git a/assets/layers/outdoor_seating/outdoor_seating.svg b/assets/layers/outdoor_seating/outdoor_seating.svg new file mode 100644 index 000000000..f06745579 --- /dev/null +++ b/assets/layers/outdoor_seating/outdoor_seating.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/layers/outdoor_seating/outdoor_seating.svg.license b/assets/layers/outdoor_seating/outdoor_seating.svg.license new file mode 100644 index 000000000..6f71e2332 --- /dev/null +++ b/assets/layers/outdoor_seating/outdoor_seating.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: Adamant36 +SPDX-License-Identifier: CC0-1.0 \ No newline at end of file diff --git a/assets/themes/cafes_and_pubs/cafes_and_pubs.json b/assets/themes/cafes_and_pubs/cafes_and_pubs.json index 6dba31fa2..38ac213b4 100644 --- a/assets/themes/cafes_and_pubs/cafes_and_pubs.json +++ b/assets/themes/cafes_and_pubs/cafes_and_pubs.json @@ -37,7 +37,9 @@ }, "icon": "./assets/layers/cafe_pub/pub.svg", "layers": [ - "cafe_pub" + "cafe_pub", + "outdoor_seating", + "food_courts" ], "widenFactor": 1.5 } \ No newline at end of file diff --git a/assets/themes/food/food.json b/assets/themes/food/food.json index f0c9e0b00..d48f52412 100644 --- a/assets/themes/food/food.json +++ b/assets/themes/food/food.json @@ -31,7 +31,9 @@ "icon": "./assets/layers/food/restaurant.svg", "layers": [ "food", - "ice_cream" + "ice_cream", + "outdoor_seating", + "food_courts" ], "widenFactor": 3 -} +} \ No newline at end of file