From 4eaa528286ee1ee3778eb569e33f09ad70aebb30 Mon Sep 17 00:00:00 2001 From: Bertil Chapuis Date: Wed, 8 Jan 2025 09:13:39 +0100 Subject: [PATCH] Add leisure track lines --- basemap/layers/leisure/line.js | 6 ++++++ basemap/themes/default.js | 3 +++ 2 files changed, 9 insertions(+) diff --git a/basemap/layers/leisure/line.js b/basemap/layers/leisure/line.js index d1cf9569b..77f7c452f 100644 --- a/basemap/layers/leisure/line.js +++ b/basemap/layers/leisure/line.js @@ -24,6 +24,11 @@ export let directives = [ 'line-color': theme.leisureNatureReserveLineColor, 'line-width': 2, }, + { + filter: ['==', ['get', 'leisure'], 'track'], + 'line-color': theme.leisureTrackLineColor, + 'line-width-stops': theme.leisureTrackLineWidth, + }, ]; export default asLayerObject(withSortKeys(directives), { @@ -36,4 +41,5 @@ export default asLayerObject(withSortKeys(directives), { 'line-cap': 'round', 'line-join': 'round', }, + 'filter': ['==', ['geometry-type'], 'LineString'], }); diff --git a/basemap/themes/default.js b/basemap/themes/default.js index 7d2ddfe1b..430c61b8c 100644 --- a/basemap/themes/default.js +++ b/basemap/themes/default.js @@ -319,6 +319,8 @@ export default { leisureSwimmingPoolOverlayOutlineColor: 'rgb(120, 183, 202)', leisureTrackBackgroundFillColor: 'rgb(196, 224, 203)', leisureTrackBackgroundFillOutlineColor: 'rgba(101, 206, 166, 1.0)', + leisureTrackLineColor: "rgb(196, 224, 203)", + leisureTrackLineWidth: [5, 0.5, 16, 2], manMadeBridgeFillColor: 'rgb(184, 184, 184)', manMadeGroyneFillColor: 'rgb(184, 184, 184)', manMadeIconColor: 'rgb(85, 85, 85)', @@ -416,4 +418,5 @@ export default { waterwayTextColor: 'rgba(26, 109, 187, 1)', waterwayTextHaloColor: 'rgba(255, 255, 255, 0.8)', waterwayTunnelColor: 'rgb(216,237,250)', + };