WeatherBlox - Map Viewer
Map ViewerObject
aeris.wxblox.views.MapViewerData Usage
Raster Maps usage based on size of map and total layers.
A MapViewer view is responsible for displaying and managing a weather map consisting of one or more data layers. This view also handles animating weather data across a specific time range.

Examples
Display a MapViewer component with navigation options to change the zoom level and layer data types centered on Austin, TX:
const view = new aeris.wxblox.views.MapViewer('#wxblox', {
map: {
loc: 'austin,tx',
data: ['radar']
},
controls: {
layers: [{
value: 'radar',
title: 'Radar'
},{
value: 'satellite',
title: 'Satellite'
},{
value: 'alerts',
title: 'Advisories'
},{
value: 'temperatures,clip-us-flat',
title: 'Temps'
}],
regions: [{
zoom: 7,
title: 'Local'
},{
zoom: 5,
title: 'Regional'
},{
region: 'us',
title: 'National'
}]
}
});
view.load();Configuration
The following configuration options are supported by this view:
| Option | Description | Default |
|---|---|---|
map | Type: object () | |
map.layers | Type: object () | |
map.layers.base | Type: array () | |
map.layers.overlays | Type: array () | |
map.layers.data | Type: array () | |
map.center | Type: string () | |
map.zoom | Type: number () | |
map.bounds | Type: string () | |
map.region | Type: string () | |
map.size.width | Type: number () | |
map.size.height | Type: number () | |
map.size.factor | Type: number () | |
map.offset | Type: string () | |
map.autoFuture | Type: boolean () | |
map.combine | Type: boolean () | |
animation | Type: object () | |
animation.enabled | Type: boolean () | |
animation.from | Type: number () | |
animation.to | Type: number () | |
animation.duration | Type: number () | |
animation.endDelay | Type: number () | |
animation.intervals | Type: number () | |
animation.autoplay | Type: boolean () | |
animation.refresh | Type: number () | |
overlays | Type: object () | |
overlays.title | Type: string () | |
overlays.timestamp | Type: string () | |
overlays.timestamp.format | Type: string () | |
overlays.timestamp.continuous | Type: boolean () | |
overlays.branding | Type: object () | |
overlays.branding.img | Type: string () | |
overlays.branding.html | Type: string () | |
selectors | Type: object () | |
controls | Type: object () | |
controls.layers | Type: array () | |
controls.layers[#].value | Type: string () | |
controls.layers[#].title | Type: string () | |
controls.regions | Type: array () | |
controls.regions[#].zoom | Type: number () | |
controls.regions[#].loc | Type: string () | |
controls.regions[#].title | Type: string () | |
enabled | Type: boolean () | |
metric | Type: boolean () | |
renderNoData | Type: boolean () | |
request | Type: object () | |
Methods
The following methods are supported by instances of this view:
viewer()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