WeatherBlox - Maps Layout
Maps LayoutObject
aeris.wxblox.layouts.local.MapsData Usage
Raster Maps usage based on size of map and total layers.
The Maps layout displays and manages a MapController view along with a MapListing menu for changing data layers and a map region menu for updating the active bounds for the map.

Examples
Display a weather map view using the default configuration with custom options for layers (MapListing) component:
const view = new aeris.wxblox.layouts.Maps('#wxblox', {
layers: {
categories: [],
codes: ['radar', 'alerts', 'temperatures']
}
});
view.load();Display a weather map view using a custom region selector menu and different categories for the maps listing:
const view = new aeris.wxblox.layouts.Maps('#wxblox', {
layers: {
categories: ['radar/sat', 'severe', 'observations']
},
regions: {
items: {
us: {
label: 'United States'
},
region: {
us: aeris.wxblox.regions.asArray(['usne','usse','usnc','ussc','usnw','ussw'], {
label: 'name',
value: 'code'
})
}
}
}
});
view.load();Configuration
The following configuration options are supported by this view:
| Option | Description | Default |
|---|---|---|
controller | Type: object () | |
controller.viewer | Type: object () | |
controller.viewer.map | Type: object () | |
controller.viewer.map.layers | Type: object () | |
controller.viewer.map.layers.base | Type: array () | |
controller.viewer.map.layers.data | Type: array () | |
controller.viewer.map.layers.overlays | Type: array () | |
controller.viewer.map.size | Type: object () | |
controller.viewer.map.size.width | Type: number () | |
controller.viewer.map.size.height | Type: number () | |
controller.viewer.map.size.factor | Type: number () | |
controller.viewer.animation | Type: object () | |
controller.viewer.animation.enabled | Type: boolean () | |
controller.viewer.animation.autoplay | Type: boolean () | |
controller.viewer.animation.alwaysShowPast | Type: boolean () | |
controller.viewer.animation.alwaysShowFuture | Type: boolean () | |
controller.viewer.animation.duration | Type: number () | |
controller.viewer.animation.endDelay | Type: number () | |
controller.viewer.animation.intervals | Type: number () | |
controller.viewer.overlays | Type: object () | |
controller.viewer.overlays.timestamp | Type: string () | |
controller.viewer.overlays.branding | Type: object () | |
controller.viewer.overlays.branding.img | Type: string () | |
controller.viewer.overlays.branding.html | Type: string () | |
controller.range | Type: object () | |
controller.range.intervals | Type: string () | |
controller.range.init | Type: object () | |
controller.range.init.from | Type: number () | |
controller.range.init.to | Type: number () | |
regions | Type: object () | |
layers | Type: object () | |
layers.categories | Type: string () | |
layers.codes | Type: string () | |
layers.type | Type: string () | |
layers.links | Type: boolean () | |
selectors | Type: object () | |
selectors.controller | Type: string () | |
selectors.regions | Type: string () | |
selectors.layers | Type: string () | |
init | Type: object () | |
init.regions | Type: object () | |
init.regions.key | Type: string () | |
init.layers | Type: object () | |
init.layers.value | Type: string () | |
enabled | Type: boolean () | |
metric | Type: boolean () | |
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