Class: EditBar

ol.control. EditBar


new EditBar( [options])

Control bar for editing in a layer

Parameters:
Name Type Argument Description
options Object <optional>

Control options.

Properties
Name Type Description
className String

class of the control

target String

Specify a target if you want the control to be rendered outside of the map's viewport.

edition boolean

false to remove the edition tools, default true

interactions Object

List of interactions to add to the bar ie. Select, Delete, Info, DrawPoint, DrawLine, DrawPolygon Each interaction can be an interaction or true (to get the default one) or false to remove it from bar

source ol.source.Vector

Source for the drawn features.

Fires:
  • event:info

Extends

Methods


_getTitle()

Get the option title


addControl(c)

Add a control to the bar

Parameters:
Name Type Description
c _ol_control_

control to add

Inherited From:

deactivateControls(except)

Deativate all controls in a bar

Parameters:
Name Type Description
except _ol_control_

a control

Inherited From:

getControls()

Get controls in the panel

Parameters:
Type Description
Array.<_ol_control_>
Inherited From:

getControlsByName(name)

Parameters:
Name Type Description
name string

of the control to search

Inherited From:
Returns:
Type
ol.control.Control

getInteraction(name)

Get an interaction associated with the bar

Parameters:
Name Type Description
name string

getVisible()

Get the control visibility

Inherited From:
Returns:

b

Type
boolean

onActivateControl_(e)

Post-process an activated/deactivated control

Parameters:
Name Type Description
e ol.event

:an object with a target {ol_control} and active flag {bool}

Inherited From:

setActive(b)

Auto activate/deactivate controls in the bar

Parameters:
Name Type Description
b boolean

activate/deactivate

Inherited From:

setMap(map)

Set the map instance the control is associated with and add its controls associated to this map.

Parameters:
Name Type Description
map _ol_Map_

The map instance.

Overrides:

setPosition(pos)

Set tool bar position

Parameters:
Name Type Description
pos top | left | bottom | right
Inherited From:

setVisible(b)

Set the control visibility

Parameters:
Name Type Description
b boolean
Inherited From: