/ui/layers/view
The module exports a method to create layer.view elements.
- Source
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.
Name | Type | Description |
---|---|---|
layer | layer | A decorated mapp layer. |
Name | Type | Description |
---|---|---|
layer.view | HTMLElement | The layer view element. |
layer.displayToggle | HTMLElement | A button element which toggles the layer.display. |
layer.zoomBtn | HTMLElement | A button element which sets the mapview into the visible zoom range for the layer. |
- Source
(inner) layerView(layer) → {layer}
The layerView method will create and assign a layer.view node to the layer object.
Name | Type | Description |
---|---|---|
layer | layer | A decorated mapp layer. |
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
layer.view | Object | No layer view will be created with the view property null. | ||
layer.drawer | Object | The layer view will not be in a drawer element with the drawer property null. | ||
layer.panelOrder | array | <optional> | ['draw-drawer', 'dataviews-drawer', 'filter-drawer', 'style-drawer', 'meta'] | The order of layer view panel elements. |
- Source
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.
Name | Type | Description |
---|---|---|
layer | layer | A decorated mapp layer. |
Name | Type | Description |
---|---|---|
layer.tables | Object | The zoom range table configuration. |
- Source