Maps Layout

Maps Layout

Object
aeris.wxblox.layouts.local.Maps
Data 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.

Maps Layout

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:

OptionDescriptionDefault
controllerType: object (undefined)Configuration options passed to the internal MapController view.``
controller.viewerType: object (undefined)Configuration options passed to the internal Map Viewer view.``
controller.viewer.mapType: object (undefined)Default map configuration.``
controller.viewer.map.layersType: object (undefined)The layer configuration for the map.``
controller.viewer.map.layers.baseType: array (undefined)An array of base map layer codes to render below all weather and overlay layers.['flat']
controller.viewer.map.layers.dataType: array (undefined)An array of supported weather layer codes.undefined
controller.viewer.map.layers.overlaysType: array (undefined)An array of overlay layer codes to render above all weather and base layers.['admin']
controller.viewer.map.sizeType: object (undefined)Configuration for the map size.{}
controller.viewer.map.size.widthType: number (undefined)[integer/auto] Map width in pixels (limited by your Aeris Maps level), or auto to have the width automatically set to fill the map container's width."auto"
controller.viewer.map.size.heightType: number (undefined)Map height in pixels (limited by your Aeris Maps level), or auto to have the height automatically calculated based on the map container's width and the specified map.size.factor ratio"auto"
controller.viewer.map.size.factorType: number (undefined)The scale factor to use when height is set to auto. The map height will be calculated by multiplying either the specified width value or DOM container's width by the factor value.0.75
controller.viewer.animationType: object (undefined)Configuration for the map animation``
controller.viewer.animation.enabledType: boolean (undefined)Whether or not to enabled animation. If false, then the viewer will only display data for the current timetrue
controller.viewer.animation.autoplayType: boolean (undefined)Whether or not to have your animation autoplay when the WxBlox layout loads.false
controller.viewer.animation.alwaysShowPastType: boolean (undefined)Whether or not to display past layers (observed) even if the timeline is in the future.false
controller.viewer.animation.alwaysShowFutureType: boolean (undefined)Whether or not to display future layers even if the timeline is in the past.false
controller.viewer.animation.durationType: number (undefined)Total duration of the animation in seconds; duration and intervals are both used to control the overall speed of the animation2
controller.viewer.animation.endDelayType: number (undefined)Number of seconds to lapse before the animation starts over.1
controller.viewer.animation.intervalsType: number (undefined)Total number of frames to use for the animation; duration and intervals are both used to control the overall speed of the animation.10
controller.viewer.overlaysType: object (undefined)Configuration for custom overlays rendered above the map.``
controller.viewer.overlays.timestampType: string (undefined)[string] or [object] A string value indicates the time and date format for the map's timeline during playback. Provide an object to include additional options.MM/DD/YYYY hh:mm A
controller.viewer.overlays.brandingType: object (undefined)Map branding options.``
controller.viewer.overlays.branding.imgType: string (undefined)A URL to an image to display on the map, such as a company logo.undefined
controller.viewer.overlays.branding.htmlType: string (undefined)An HTML string to display for the map branding, such as a company logo or name.undefined
controller.rangeType: object (undefined)Configuration for your timeline range.``
controller.range.intervalsType: string (undefined)Clickable intervals for your animation timeline.-24, -12, -6, -2, 0, 2, 6, 12, 24
controller.range.initType: object (undefined)Default configuration for the initial values of the timeline range.``
controller.range.init.fromType: number (undefined)Initial from value that is selected for the animation when your WxBlox layout loads.-2
controller.range.init.toType: number (undefined)Initial to value that is selected for the animation when your WxBlox layout loads.0
regionsType: object (undefined)An object consisting of a series of items to display in the region selector menu. Refer to the Region Menu page for usage details.{}
layersType: object (undefined)Configuration options passed to the internal MapListing view.``
layers.categoriesType: string (undefined)Add categories of layers in the Related Maps section. Applicable categories:
undefined
layers.codesType: string (undefined)Custom list of layers based on layer name.undefined
layers.typeType: string (undefined)"list" or "thumbs" to display the format of related maps. Thumbs will be the thumbnails while list will be text."list"
layers.linksType: boolean (undefined)Determines whether or not the component should use links when an item is selected or trigger an event. If set to false, you are responsible for updating your page and/or map content based on the selected item in the listing.false
selectorsType: object (undefined)Selectors for DOM render targets``
selectors.controllerType: string (undefined)DOM target where the internal MapController component is rendered.awxs-view-map
selectors.regionsType: string (undefined)DOM target where the region selector menu is rendered.awxs-nav-regions
selectors.layersType: string (undefined)DOM target where the internal MapListing component is rendered.awxs-nav-layers
initType: object (undefined)The initial values when the component is rendered``
init.regionsType: object (undefined)The initially-selected value in the region selector menu{}
init.regions.keyType: string (undefined)Regional category that will be initially selected when WeatherBlox component loads.undefined
init.layersType: object (undefined)The initially-selected value in the map layers listing menu{}
init.layers.valueType: string (undefined)AMP layer that will be initially selected when WxBlox component loads.undefined
enabledType: 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.true
metricType: 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.false

Methods

The following methods are supported by instances of this view:

Events

The following events are triggered by instances of this view: