mirror of
https://github.com/smittix/intercept.git
synced 2026-07-05 16:18:12 -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', {
|
websdrMap = L.map('websdrMap', {
|
||||||
center: [30, 0],
|
center: [30, 0],
|
||||||
zoom: 2,
|
zoom: 2,
|
||||||
|
minZoom: 2,
|
||||||
zoomControl: true,
|
zoomControl: true,
|
||||||
|
maxBounds: [[-85, -Infinity], [85, Infinity]],
|
||||||
|
maxBoundsViscosity: 1.0,
|
||||||
});
|
});
|
||||||
|
|
||||||
L.tileLayer('https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png', {
|
L.tileLayer('https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png', {
|
||||||
attribution: '© OpenStreetMap contributors © CARTO',
|
attribution: '© OpenStreetMap contributors © CARTO',
|
||||||
subdomains: 'abcd',
|
subdomains: 'abcd',
|
||||||
maxZoom: 19,
|
maxZoom: 19,
|
||||||
|
noWrap: false,
|
||||||
}).addTo(websdrMap);
|
}).addTo(websdrMap);
|
||||||
|
|
||||||
websdrInitialized = true;
|
websdrInitialized = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user