/ui/layers/view

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

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.

Parameters:
NameTypeDescription
layerlayer

A decorated mapp layer.

Properties
NameTypeDescription
layer.viewHTMLElement

The layer view element.

layer.displayToggleHTMLElement

A button element which toggles the layer.display.

layer.zoomBtnHTMLElement

A button element which sets the mapview into the visible zoom range for the layer.

(inner) layerView(layer) → {layer}

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

Parameters:
NameTypeDescription
layerlayer

A decorated mapp layer.

Properties
NameTypeAttributesDefaultDescription
layer.viewObject

No layer view will be created with the view property null.

layer.drawerObject

The layer view will not be in a drawer element with the drawer property null.

layer.panelOrderarray<optional>
['draw-drawer', 'dataviews-drawer', 'filter-drawer', 'style-drawer', 'meta']

The order of layer view panel elements.

Returns:

The layer object is returned after the layer view has been created.

Type: 
layer

(inner) zoomToRange(layer)

The zoomToRange method set layer.mapview zoom to be in range of the layer.tables configuration and calls the layer.show() method.

Parameters:
NameTypeDescription
layerlayer

A decorated mapp layer.

Properties
NameTypeDescription
layer.tablesObject

The zoom range table configuration.