/ui/layers/view

The module exports a method to create layer.view elements.

Requires

Methods

(inner) changeEnd(layer)

The changeEnd method is assigned to the mapview.Map changeEnd event listener for layer with a tables object.

Layer with a tables object maybe zoom restricted.

The layer.tableCurrent() method is called to determine whether the layer has a table configured for the current zoom level.

Nested elements will be disabled if a layer can not be displayed.

Parameters:
NameTypeDescription
layerlayer

A decorated mapp layer.

Properties
NameTypeDescription
layer.viewHTMLElement

The layer view element.

(inner) layerView(layer)

The layerView method will create and assign a layer.view node to the layer object.

Specifying layer.drawer: false create a drawer card for the layer view. The drawer cannot be collapsed.

Parameters:
NameTypeDescription
layerlayer
Properties
NameTypeAttributesDescription
layer.viewObject<optional>

The layerView method will shortcircuit if the layer.view property is null.

layer.drawerObject<optional>

The layerView method will shortcircuit after executing the viewConfig method is the layer.drawer property is null.

(inner) viewConfig(layer)

The viewConfig method will create viewConfig object and update the configuration from legacy properties.

The method will iterate through the panelOrder keys to add panel to the content array.

The method will iterate through the headerOrder keys to and execute methods from mapp.ui.layers.viewHeader{} to return elements for the headerBtn array.

Parameters:
NameTypeDescription
layerlayer
Properties
NameTypeAttributesDefaultDescription
layer.tablesArray<optional>

Array of data tables for different zoom level.

layer.viewConfigObject<optional>

Control options for elements in the layer.view.

viewConfig.displayToggleBoolean<optional>
true

Controls whether the layer toggle close is displayed.

viewConfig.zoomBtnBoolean<optional>
true

Controls whether the zoom magnifying glass is displayed.

viewConfig.hideDisabledBoolean<optional>
false

Controls whether the layer view is hidden when layer is outside its zoom range. When set to true layer will be temporarily hidden in the list until it's within restricted zoom again.

viewConfig.zoomToFilteredExtentBtnBoolean<optional>
true

Controls whether the zoom to extent button is displayed.

viewConfig.panelOrderArray<optional>
['draw-drawer', 'dataviews-drawer', 'filter-drawer', 'style-drawer', 'meta']

Controls which panels are added to the view and in which order, will be assigned from layer.panelOrder if not explicit.

viewConfig.classListstring<optional>

Classlist string to be added to layer-view drawer element classList.

viewConfig.headerOrderArray<optional>
['zoomToFilteredExtentBtn', 'zoomBtn', 'popoutBtn', 'displayToggle']

List of viewHeader methods to be executed.

viewConfig.headerBtnarray<optional>

Array of elements to be added to the layer.view header.