// Get map bounds const bounds = this.map.getBounds(); const southWest = bounds.getSouthWest(); const northEast = bounds.getNorthEast();
if (this.enabled) this.addCover();
); return found;
refreshOnViewChange() // Call this on map zoom/pan to keep cover full-screen if (this.enabled && this.coverLayer) this.addCover(); FE Map Cover Script
// Listen to map move/zoom map.on('moveend', () => myMapCover.refreshOnViewChange()); map.on('zoomend', () => myMapCover.refreshOnViewChange()); // Get map bounds const bounds = this
// ========== EXAMPLE USAGE ========== // Assuming Leaflet map called 'map' /* const myMapCover = new MapCover(map, enabled: true, color: 'rgba(0,0,0,0.8)', excludedFeatures: ['marker-1', 'polygon-main'] ); const southWest = bounds.getSouthWest()