WeatherBlox - Observations
ObservationsObject
aeris.wxblox.views.ObservationsData Usage
The Observations view displays the current weather conditions for a single location. Additionally, current active weather advisories and threats can be displayed.

Examples
Display the current observations for Minneapolis, MN including advisories and threats as needed:
const view = new aeris.wxblox.views.Observations('#wxblox');
view.load({
p: 'minneapolis,mn'
});Display the current observations for Houston, TX including advisories but without threats:
const view = new aeris.wxblox.views.Observations('#wxblox', {
threats: {
enabled: false
}
});
view.load({
p: 'houston,tx'
});Configuration
The following configuration options are supported by this view:
| Option | Description | Default |
|---|---|---|
advisories | Type: object () | |
advisories.enabled | Type: boolean () | |
threats | Type: object () | |
threats.enabled | Type: boolean () | |
enabled | Type: boolean () | |
metric | Type: boolean () | |
renderNoData | Type: boolean () | |
request | Type: object () | |
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:
renderrender:beforerender:afterload:startload:doneload:errorchange:units