FrameworkOptions
Options for creating a custom weather layer in Leaflet.
This interface extends the L.GridLayerOptions interface provided by Leaflet, adding a mandatory id field to uniquely identify the layer.
id
function addWeatherLayer(map: MapInstance) { try { const options: FrameworkOptions = { id: 'customWeatherLayer', opacity: 0.7, attribution: 'Weather Tiles © 2024', interactive: true, }; const weatherLayer = new FrameworkParentClass(options); map.addLayer(weatherLayer); console.log('Weather layer added:', weatherLayer); } catch (error) { console.error('Error adding weather layer:', error); }}// Example usage (assuming `map` is defined)addWeatherLayer(map);
Layer Identifier
A unique string used to identify the layer instance. Required for distinguishing between multiple layers, especially when managing or removing them from the map.
Generated using TypeDoc
FrameworkOptions
Options for creating a custom weather layer in Leaflet.
This interface extends the L.GridLayerOptions interface provided by Leaflet, adding a mandatory
id
field to uniquely identify the layer.Example