From bfd92e3883abdf043854a6bed4a7ed66eaa828a1 Mon Sep 17 00:00:00 2001 From: Smittix Date: Sat, 7 Feb 2026 14:30:23 +0000 Subject: [PATCH] Constrain WebSDR map to prevent vertical black space MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add maxBounds to limit vertical panning to ±85° latitude and set minZoom to 2 so tiles always cover the visible area. Prevents the large black bands above and below the map tiles. Co-Authored-By: Claude Opus 4.6 --- static/js/modes/websdr.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/static/js/modes/websdr.js b/static/js/modes/websdr.js index 7b67c05..6a0a48c 100644 --- a/static/js/modes/websdr.js +++ b/static/js/modes/websdr.js @@ -41,13 +41,17 @@ function initWebSDR() { websdrMap = L.map('websdrMap', { center: [30, 0], zoom: 2, + minZoom: 2, zoomControl: true, + maxBounds: [[-85, -Infinity], [85, Infinity]], + maxBoundsViscosity: 1.0, }); L.tileLayer('https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png', { attribution: '© OpenStreetMap contributors © CARTO', subdomains: 'abcd', maxZoom: 19, + noWrap: false, }).addTo(websdrMap); websdrInitialized = true;