Initializes a new WxTileSource instance.
Configuration options for the WxLayerBaseImplementation.
Framework-specific options.
A boolean flag indicating whether the dataset manager needs to be updated or not.
Unique Layer Identifier
A required unique identifier for the layer. Useful for managing multiple layers and tracking them within a map instance.
returns the dataset manager of the source
the dataset manager of the source
Protected
_Iterates over all tiles and applies a callback function.
An array of results from the callback function.
The callback function to execute for each tile.
A name for logging purposes.
Protected
createCreates a new tile element and loads its data.
The created canvas element representing the tile.
The coordinates of the tile to load.
A callback function to signal completion.
Retrieves information about a specific point on the map.
Information about the tile at the specified point, or undefined if unavailable.
The longitude and latitude of the point.
The map instance. This is kept generic to allow flexibility.
Cleans up the layer when it is removed from a map.
The current WxTileSource instance.
The map instance.
Preloads tiles for faster rendering for a specific time is set setTime. If the time is not available, the closest time will be used.
A promise that resolves when the tiles are preloaded.
The time to preload.
Optional
requestInit: WxRequestInitRequest options for fetch.
Set the style of the source by its name from default styles.
A promise that resolves when the style is set.
Name of the new style to set.
If true, the source will be reloaded and rerendered.
Set time and render the source. If the time is not available, the closest time will be used.
A promise that resolves with current time step when the time is set and the source is loaded and rendered.
Optional
time: WxDateTime to set.
Optional
requestInit: WxRequestInitRequest options for fetch.
Optional
redraw: booleanUpdate the current style object of the source partially or completely.
A promise that resolves when the style is set.
Optional
style: WxColorStyleWeakStyle's fields to set.
If true, the source will be reloaded and rerendered.
Optional
requestInit: WxRequestInitRequest options.
Generated using TypeDoc
A custom layer source implementation for displaying weather data tiles. This class integrates with Leaflet and the WxTiles API to fetch, display, and manage tiles representing weather data such as temperature, wind speed, or other meteorological variables.
Example
Alternatively, use createSourceLayer to simplify the creation process.