Constructor
new ToolboxController(toolList)
Parameters:
Name | Type | Description |
---|---|---|
toolList | object | The list of tool objects. |
Classes
Methods
bindLayer(layer, layerGroupDivId)
Listen to layer interaction events.
Parameters:
Name | Type | Description |
---|---|---|
layer | object | The layer to listen to. |
layerGroupDivId | string | The associated layer group div id. |
getSelectedTool() → {object}
Get the selected tool.
Returns:
The selected tool.
- Type:
- object
getSelectedToolEventHandler(eventType) → {function}
Get the selected tool event handler.
Parameters:
Name | Type | Description |
---|---|---|
eventType | string | The event type, for example mousedown, touchstart... |
Returns:
The event handler.
- Type:
- function
getToolList() → {Array}
Get the tool list.
Returns:
The list of tool objects.
- Type:
- Array
hasTool(name) → {boolean}
Check if a tool is in the tool list.
Parameters:
Name | Type | Description |
---|---|---|
name | string | The name to check. |
Returns:
The tool list element for the given name.
- Type:
- boolean
init()
Initialise.
setSelectedTool(name)
Set the selected tool.
Parameters:
Name | Type | Description |
---|---|---|
name | string | The name of the tool. |
setToolFeatures(list)
Set the selected tool live features.
Parameters:
Name | Type | Description |
---|---|---|
list | object | The list of features. |