From b5c39721047aaecf3fbb057ee08c4b7eb5a4d081 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Wed, 12 Oct 2022 18:42:34 +0200 Subject: [PATCH] Add sports centre layer --- assets/layers/sports_centre/license_info.json | 13 +++++ .../layers/sports_centre/sports_centre.json | 58 +++++++++++++++++++ assets/layers/sports_centre/sports_centre.svg | 7 +++ assets/themes/sports/sports.json | 14 +++-- 4 files changed, 86 insertions(+), 6 deletions(-) create mode 100644 assets/layers/sports_centre/license_info.json create mode 100644 assets/layers/sports_centre/sports_centre.json create mode 100644 assets/layers/sports_centre/sports_centre.svg diff --git a/assets/layers/sports_centre/license_info.json b/assets/layers/sports_centre/license_info.json new file mode 100644 index 000000000..0cbc965a6 --- /dev/null +++ b/assets/layers/sports_centre/license_info.json @@ -0,0 +1,13 @@ +[ + { + "path": "sports_centre.svg", + "license": "CC-BY", + "authors": [ + "Hello world", + "The Noun Project" + ], + "sources": [ + "https://thenounproject.com/icon/rogers-centre-464379/" + ] + } +] \ No newline at end of file diff --git a/assets/layers/sports_centre/sports_centre.json b/assets/layers/sports_centre/sports_centre.json new file mode 100644 index 000000000..b730d9889 --- /dev/null +++ b/assets/layers/sports_centre/sports_centre.json @@ -0,0 +1,58 @@ +{ + "id": "sports_centre", + "name": { + "en": "Sports centres" + }, + "description": { + "en": "Indoor and outdoor sports centres can be found on this layer" + }, + "minzoom": 12, + "source": { + "osmTags": "leisure=sports_centre" + }, + "title": { + "render": { + "en": "Sports centre" + }, + "mappings": [ + { + "if": "name~*", + "then": "{name}" + } + ] + }, + "tagRenderings": [ + "images", + "opening_hours", + "phone", + "website", + "email", + "wheelchair-access" + ], + "presets": [ + { + "title": { + "en": "a sports centre" + }, + "tags": [ + "leisure=sports_centre" + ] + } + ], + "mapRendering": [ + { + "icon": "circle:white;./assets/layers/sports_centre/sports_centre.svg", + "location": ["point", "centroid"] + }, + { + "color": "darkgreen", + "fill": "no" + } + ], + "allowMove": { + "enableImproveAccuracy": true + }, + "filter": [ + "open_now" + ] +} diff --git a/assets/layers/sports_centre/sports_centre.svg b/assets/layers/sports_centre/sports_centre.svg new file mode 100644 index 000000000..2f59933a9 --- /dev/null +++ b/assets/layers/sports_centre/sports_centre.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/assets/themes/sports/sports.json b/assets/themes/sports/sports.json index 56e0a22e3..b3b7001ca 100644 --- a/assets/themes/sports/sports.json +++ b/assets/themes/sports/sports.json @@ -17,11 +17,16 @@ "sport_pitch", "fitness_centre", "fitness_station", + "sports_centre", { "builtin": "shops", "override": { "source": { - "osmTags": "shop=sports" + "osmTags": { + "and": [ + "shop=sports" + ] + } }, "presets": [ { @@ -37,10 +42,7 @@ } ], "minzoom": 12 - }, - "hideTagRenderingsWithLabels": [ - "shop_types" - ] + } } ] -} \ No newline at end of file +}