new LayerSwipe(options)
Class that provides layer swiping effect
Parameters:
| Name | Type | Description |
|---|---|---|
options |
nyc.ol.control.LayerPicker.Options | Constructor options |
- Source:
Extends
Members
controls :Array.<nyc.Choice>
The layer picker controls
Type:
- Array.<nyc.Choice>
- Inherited From:
- Source:
layerGroups :Array.<nyc.ol.control.LayerPicker.LayerGroup>
The layer groups displayed on the picker
Type:
- Inherited From:
- Source:
map :ol.Map
The map from which layers can be picked
Type:
- ol.Map
- Inherited From:
- Source:
Methods
cancel()
Clear the display
- Source:
getButtonHtml() → {string}
Provides an HTML string for creating a menu actuator when a DOM target is not provided to the constructor
- Overrides:
- Source:
Returns:
- Type
- string
getLayerGoupsFromMap(map) → {Array.<nyc.ol.control.LayerPicker.LayerGroup>}
Provides layer groups from the map when they are not provided to the constructor
Parameters:
| Name | Type | Description |
|---|---|---|
map |
ol.Map |
- Overrides:
- Source:
Returns:
- Type
- Array.<nyc.ol.control.LayerPicker.LayerGroup>
(abstract) getLayers() → {Object.<string, ol.layer.Base>}
Return a map of layers by name
- Inherited From:
- Source:
Returns:
- Type
- Object.<string, ol.layer.Base>
getMenuClass() → {string}
Provides an HTML DOM element class for menu creation when a DOM target is not provided to the constructor
- Overrides:
- Source:
Returns:
- Type
- string
(abstract) loadedGroup(control, group, layers)
Provides notification that layers form a group namespace have been added
Parameters:
| Name | Type | Description |
|---|---|---|
control |
nyc.Choice | |
group |
Object | |
layers |
Array.<ol.layer.Base> |
- Inherited From:
- Source:
setActive(active)
Set active state of swipe
Parameters:
| Name | Type | Description |
|---|---|---|
active |
boolean | The active state |
- Source:
setLeft(layer)
Set the left layer of the swipe
Parameters:
| Name | Type | Description |
|---|---|---|
layer |
ol.layer.Base | The layer for the left side of a swipe |
- Source:
setRight(layer)
Set the right layer of the swipe
Parameters:
| Name | Type | Description |
|---|---|---|
layer |
ol.layer.Base | The layer for the right side of a swipe |
- Source: