Internal
Creates a new instance of the WxTileSource
class.
The options for the WxLayerBaseImplementation.
The options for the framework.
Protected
_needA boolean flag indicating whether the dataset manager needs to be updated or not.
Optional
Readonly
attributionMAPBOX API
Optional
Readonly
boundsMAPBOX API
Readonly
dataMAPBOX API required
Readonly
idMAPBOX API required
Optional
Readonly
maxzoomMAPBOX API
Optional
Readonly
opacityReadonly
tileMAPBOX API required. only 256
Readonly
typeMAPBOX API required
returns the dataset manager of the source
the dataset manager of the source
Protected
fireFires an event of the specified type with the given data. Calls all listeners for the type asynchronously.
The event type.
The data to pass to the listeners.
Internal
Get the raster data cache of the layer. Used in CustomWxTilesLayer.render.
The raster data cache of the layer.
Get a copy of the current style of the source.
A copy of the current style of the source.
Get the metadata of the current variable(s).
Get comprehensive information about the current point on the map.
Coordinates of the point.
map instance.
Get the metadata of the current variable(s).
Get current variables (1 or 2) of the source/layer.
variables of the source.
Internal
Loads a tile with the given coordinates and request options. Used by framework. Creates a representation of a tile for the framework. It rethrows 'AbortError' errors. It returns empty tile during datasetManager update or in case of any other error (e.g. network error, not found, etc.) It tries to update datasetManager if e.reason === 'instance-not-found' and update the layer
The tile coordinates to be loaded.
Optional
requestInit: WxRequestInitThe request options.
Removes a listener for the event.
The event name.
The listener function to remove.
add a listener for the event
event name
listener function
Adds a listener for the event that will be executed only once. After the event is fired, the listener will be removed.
The event name.
The listener function to add.
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 It is used to load and display weather data from the WxTiles server. NOTE Dont use this directly, use createSourceLayer instead
Example