mirror of
https://github.com/smittix/intercept.git
synced 2026-04-24 06:40:00 -07:00
Constrain WebSDR map to prevent vertical black space
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user