From 20c6a7c3e52ce73af1bf66084cb3456766b52a18 Mon Sep 17 00:00:00 2001 From: accius Date: Fri, 30 Jan 2026 15:01:57 -0500 Subject: [PATCH] updated map zoom limits --- public/index.html | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/public/index.html b/public/index.html index bb1877c..b0f59ab 100644 --- a/public/index.html +++ b/public/index.html @@ -1245,20 +1245,21 @@ const map = L.map(mapRef.current, { center: [20, 0], - zoom: 2, - minZoom: 2, + zoom: 2.5, + minZoom: 2.3, maxZoom: 18, - worldCopyJump: false, + worldCopyJump: true, zoomControl: true, - maxBounds: [[-85, -180], [85, 180]], - maxBoundsViscosity: 1.0 + maxBounds: [[-90, -Infinity], [90, Infinity]], + maxBoundsViscosity: 0.8 }); - // Initial tile layer + // Initial tile layer with bounds to prevent edge requests tileLayerRef.current = L.tileLayer(MAP_STYLES[mapStyle].url, { attribution: MAP_STYLES[mapStyle].attribution, - noWrap: true, - crossOrigin: 'anonymous' + noWrap: false, + crossOrigin: 'anonymous', + bounds: [[-85, -180], [85, 180]] }).addTo(map); // Day/night terminator with resolution option for smoother rendering @@ -1307,8 +1308,9 @@ mapInstanceRef.current.removeLayer(tileLayerRef.current); tileLayerRef.current = L.tileLayer(MAP_STYLES[mapStyle].url, { attribution: MAP_STYLES[mapStyle].attribution, - noWrap: true, - crossOrigin: 'anonymous' + noWrap: false, + crossOrigin: 'anonymous', + bounds: [[-85, -180], [85, 180]] }).addTo(mapInstanceRef.current); // Ensure terminator is on top