Tropical
aeris.wxblox.views.Tropical
Raster Maps usage based on size of map and total layers.
The Tropical view displays a variety of view types depending on the desired output using the viewType
configuration option.
Examples
Display the active tropical systems for the current season in a single listing:
const view = new aeris.wxblox.views.Tropical('#wxblox');
view.load();
Display the active tropical systems for the current season in a tabbed format:
const view = new aeris.wxblox.views.Tropical('#wxblox', {
show: {
tabbed: true
}
});
view.load();
Display all tropical systems for the current season in a single listing:
const view = new aeris.wxblox.views.Tropical('#wxblox', {
viewType: 'archive'
});
view.load();
Display all tropical systems for 2005 in a tabbed format:
const view = new aeris.wxblox.views.Tropical('#wxblox', {
viewType: 'archive',
year: '2005'
});
view.load();
Display the full track for a specific tropical system (example uses Katrina):
const view = new aeris.wxblox.views.Tropical('#wxblox', {
viewType: 'track'
});
view.load({
p: '2005-AL-12'
});
Configuration
The following configuration options are supported by this view:
Option | Description | Default |
---|---|---|
viewType | Type: string (undefined)The type of view to display from the supported options: active displays only the active systems for a given season and as a result will only return data for the current season; archive displays the full list of tropical systems for a given season, both active and non-active; track displays the full track details for a single system. |
|
year | Type: string (undefined)The season of the year to request data for (not used if viewType is track). |
|
basins | Type: string (undefined)The basin codes to include in the basin listing views. |
|
reversed | Type: boolean (undefined)Whether the basin systems or system track information should be reversed where the newest data will appear at the top of listings. |
|
maps | Type: object (undefined)Configuration for the static Aeris Maps (AMP) image associated with each active system (only used when viewType is active). | `` |
show.title | Type: boolean (undefined)Whether the view title should be rendered above the output. |
|
show.empty | Type: boolean (undefined)Whether basins without any systems returned should be included in basin listings. |
|
show.tabbed | Type: boolean (undefined)Whether the basin listings should be rendered in a tabbed format rather than a single vertical list. |
|
show.maps | Type: boolean (undefined)Whether current position maps should be included for active systems; this value will automatically be false if you're Aeris account doesn't include access to tropical layers via the Aeris Maps Platform. |
|
show.links | Type: boolean (undefined)Whether system links should be included when rendering basin listings. |
|
enabled | Type: boolean (undefined)Whether or not the view is enabled. If false then the view will not be rendered and data required for the view will not be requested. This option is typically only applicable for views contained within a parent layout. |
|
metric | Type: boolean (undefined)Whether or not to display units in metric. The method setUnits() can be used at runtime once a view has rendered to change the units currently displayed. |
|
renderNoData | Type: boolean (undefined)Whether or not the view should be rendered if data was not returned or not available. |
|
request | Type: object (undefined)An object containing the default Weather API request options to use for the views's data request where applicable. These parameters can also be overriden in the load(:params) method when rendering the view using the JavaScript method. | `` |
Methods
The following methods are supported by instances of this view:
rendered()
show()
hide()
params()
setUnits(:number)
units()
enabled()
setMetric(:boolean)
load(:object)
refresh()
isMetric()
Events
The following events are triggered by instances of this view:
render
render:before
render:after
load:start
load:done
load:error
change:units