From 102c2ab8b2a0385e1b52143edb36dacdeb3d2951 Mon Sep 17 00:00:00 2001 From: Bertil Chapuis Date: Wed, 8 Feb 2023 16:33:58 +0100 Subject: [PATCH] Improve ordering of leisure layer --- basemap/layers/leisure/background.js | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/basemap/layers/leisure/background.js b/basemap/layers/leisure/background.js index 23ed22cae..d7e1dc40a 100644 --- a/basemap/layers/leisure/background.js +++ b/basemap/layers/leisure/background.js @@ -6,10 +6,6 @@ let directives = [ 'fill-color': 'rgb(170, 211, 223)', 'fill-outline-color': 'rgb(120, 183, 202)', }, - { - filter: ['==', ['get', 'leisure'], 'sports_centre'], - 'fill-color': 'rgb(223, 252, 226)', - }, { filter: ['==', ['get', 'leisure'], 'miniature_golf'], 'fill-color': 'rgb(181, 226, 181)', @@ -36,23 +32,22 @@ let directives = [ 'fill-color': 'rgb(223, 252, 226)', 'fill-outline-color': 'rgb(164, 221, 169)', }, + { + filter: ['==', ['get', 'leisure'], 'pitch'], + 'fill-color': 'rgb(170, 224, 203)', + 'fill-outline-color': 'rgb(151, 212, 186)', + }, { filter: ['==', ['get', 'leisure'], 'track'], 'fill-color': 'rgb(196, 224, 203)', }, { - filter: ['==', ['get', 'leisure'], 'stadium'], + filter: ['==', ['get', 'leisure'], 'sports_centre'], 'fill-color': 'rgb(223, 252, 226)', }, { - filter: ['==', ['get', 'leisure'], 'pitch'], - 'fill-color': 'rgb(170, 224, 203)', - 'fill-outline-color': 'rgb(151, 212, 186)', - }, - { - filter: ['==', ['get', 'leisure'], 'swimming_pool'], - 'fill-color': 'rgb(170, 211, 223)', - 'fill-outline-color': 'rgb(120, 183, 202)', + filter: ['==', ['get', 'leisure'], 'stadium'], + 'fill-color': 'rgb(223, 252, 226)', }, { filter: ['==', ['get', 'leisure'], 'park'], @@ -65,6 +60,7 @@ export default asLayerObject(withSortKeys(directives), { type: 'fill', source: 'baremaps', 'source-layer': 'leisure', + filter: ['==', ['geometry-type'], 'Polygon'], layout: { visibility: 'visible', },