LayerSelector
Expression Extends:
class LayerSelector extends mixin(Control, ListenerOrganizerMixin)
This control shows Buttons to let you select the layer you want to see on the map. It supports categories and nested categories - each {GroupLayer}-Object will be interpreted as a category.
Constructor Summary
Public Constructor | ||
public |
constructor(options: LayerSelectorOptions) |
Member Summary
Public Members | ||
public |
layers_: * |
|
public |
menu_: * |
|
public |
scrolled_: * |
Protected Members | ||
protected |
classNames |
Private Members | ||
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
Method Summary
Public Methods | ||
public |
addWindowToButton($button: *, layer: *) |
|
public |
used by positioning |
|
public |
|
|
public |
build() |
|
public |
buildCategoryButton(categoryLayer: GroupLayer, $target: jQuery): * builds a category button which collapses on click |
|
public |
buildLayerButton(layer: ol.layer.Base, $target: jQuery): * this method builds a button for a layer. |
|
public |
buildWMSButton(wmsLayer: *, $target: *): * |
|
public |
chooseButtonBuilder(layer: ol.layer.Base, $target: jQuery): * This method chooses the right builder function |
|
public |
clear() |
|
public |
|
|
public |
|
|
public |
isSqueezable(dimension: string): boolean Returns true if the control is squeezable in the given dimension. |
|
public |
rebuild() |
|
public |
Removes the squeeze. |
|
public |
setCollapsed(collapsed: boolean, silent: boolean) |
|
public |
Squeezes the control in the given dimension by the provided value. |
|
public |
|
Public Constructors
public constructor(options: LayerSelectorOptions) source
Params:
Name | Type | Attribute | Description |
options | LayerSelectorOptions |
Public Members
public layers_: * source
public menu_: * source
public scrolled_: * source
Protected Members
Private Members
Public Methods
public addWindowToButton($button: *, layer: *) source
Params:
Name | Type | Attribute | Description |
$button | * | ||
layer | * |
public beforePositioning() source
public build() source
public buildCategoryButton(categoryLayer: GroupLayer, $target: jQuery): * source
builds a category button which collapses on click
Params:
Name | Type | Attribute | Description |
categoryLayer | GroupLayer | ||
$target | jQuery |
Return:
* |
public buildLayerButton(layer: ol.layer.Base, $target: jQuery): * source
this method builds a button for a layer. It toggles visibility if you click on it
Params:
Name | Type | Attribute | Description |
layer | ol.layer.Base | ||
$target | jQuery |
Return:
* |
public buildWMSButton(wmsLayer: *, $target: *): * source
Params:
Name | Type | Attribute | Description |
wmsLayer | * | ||
$target | * |
Return:
* |
public chooseButtonBuilder(layer: ol.layer.Base, $target: jQuery): * source
This method chooses the right builder function
Params:
Name | Type | Attribute | Description |
layer | ol.layer.Base | ||
$target | jQuery |
Return:
* |
public clear() source
public isSqueezable(dimension: string): boolean source
Returns true if the control is squeezable in the given dimension. Used by Positioning.
Params:
Name | Type | Attribute | Description |
dimension | string |
public rebuild() source
public release(dimension: string) source
Removes the squeeze. Used by Positioning.
Params:
Name | Type | Attribute | Description |
dimension | string |
public squeezeBy(dimension: string, value: number): number source
Squeezes the control in the given dimension by the provided value. Used by Positioning Returns the value the control could get squeezed by.