From f8784bbcec93c4f3d014297a489aa2c833e5cd6b Mon Sep 17 00:00:00 2001 From: Rene Fichtmueller Date: Fri, 27 Mar 2026 23:19:57 +1300 Subject: [PATCH] fix: Leaflet map tile rendering in collapsed containers invalidateSize() + refitBounds after 200ms delay fixes tiles only loading in top-left corner when map card was initially hidden --- public/index.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/public/index.html b/public/index.html index 8f992af..24e5b31 100644 --- a/public/index.html +++ b/public/index.html @@ -1317,6 +1317,13 @@ function renderNetworkMap(d) { }); _pcMap.fitBounds(bounds, { padding: [30, 30], maxZoom: 6 }); + // Fix tile rendering in initially-hidden containers + setTimeout(function() { + if (_pcMap) { + _pcMap.invalidateSize(); + _pcMap.fitBounds(bounds, { padding: [30, 30], maxZoom: 6 }); + } + }, 200); }