/ui/layers/view
The module exports a method to create layer.view elements.
- Source
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.
| Name | Type | Description |
|---|---|---|
layer | layer | A decorated mapp layer. |
| Name | Type | Description |
|---|---|---|
layer.view | HTMLElement | The layer view element. |
- Source
(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.
| Name | Type | Description |
|---|---|---|
layer | layer |
| Name | Type | Attributes | Description |
|---|---|---|---|
layer.view | Object | <optional> | The layerView method will shortcircuit if the layer.view property is null. |
layer.drawer | Object | <optional> | The layerView method will shortcircuit after executing the viewConfig method is the layer.drawer property is null. |
- Source
(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.
| Name | Type | Description |
|---|---|---|
layer | layer |
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
layer.tables | Array | <optional> | Array of data tables for different zoom level. | |
layer.viewConfig | Object | <optional> | Control options for elements in the layer.view. | |
viewConfig.displayToggle | Boolean | <optional> | true | Controls whether the layer toggle close is displayed. |
viewConfig.zoomBtn | Boolean | <optional> | true | Controls whether the zoom magnifying glass is displayed. |
viewConfig.hideDisabled | Boolean | <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.zoomToFilteredExtentBtn | Boolean | <optional> | true | Controls whether the zoom to extent button is displayed. |
viewConfig.panelOrder | Array | <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.classList | string | <optional> | Classlist string to be added to layer-view drawer element classList. | |
viewConfig.headerOrder | Array | <optional> | ['zoomToFilteredExtentBtn', 'zoomBtn', 'popoutBtn', 'displayToggle'] | List of viewHeader methods to be executed. |
viewConfig.headerBtn | array | <optional> | Array of elements to be added to the layer.view header. |
- Source