From 3d8e568f8cea579b252dd92977758713f0177625 Mon Sep 17 00:00:00 2001 From: Christian Gick Date: Fri, 3 Apr 2026 15:58:28 +0300 Subject: [PATCH] fix: desaturate base map (white land, light gray sea) Makes choropleth colors pop against neutral background. Hides landcover/landuse/park fills. Co-Authored-By: Claude Opus 4.6 (1M context) --- layouts/shortcodes/world-map.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/layouts/shortcodes/world-map.html b/layouts/shortcodes/world-map.html index 44814d3..286cb62 100644 --- a/layouts/shortcodes/world-map.html +++ b/layouts/shortcodes/world-map.html @@ -65,6 +65,20 @@ function ifkInitMap() { window._ifkMap.addControl(new maplibregl.NavigationControl({ showCompass: false }), 'top-right'); window._ifkMap.on('load', function() { + // Desaturate base map: white land, light gray sea + var style = window._ifkMap.getStyle(); + style.layers.forEach(function(l) { + if (l.id === 'background') { + window._ifkMap.setPaintProperty(l.id, 'background-color', '#e8e8e8'); + } + if (l.type === 'fill' && (l.id.indexOf('water') >= 0 || l.id.indexOf('ocean') >= 0)) { + window._ifkMap.setPaintProperty(l.id, 'fill-color', '#f0f0f0'); + } + if (l.type === 'fill' && (l.id.indexOf('landcover') >= 0 || l.id.indexOf('landuse') >= 0 || l.id.indexOf('park') >= 0)) { + window._ifkMap.setPaintProperty(l.id, 'fill-opacity', 0); + } + }); + fetch('{{ "data/countries-110m.json" | relURL }}') .then(function(r) { return r.json(); }) .then(function(topo) {