Class: Control

Control(options, standaloneopt)

OLE control base class.

Constructor

new Control(options, standaloneopt)

Parameters:
Name Type Attributes Description
options Object Control options.
Properties
Name Type Attributes Description
className string Name of the control's HTML class.
title string Title of the control toolbar button.
image Image Control toolbar image.
source ol.source.Vector <optional>
Vector source holding edit features. If undefined, options.features must be passed.
features ol.Collection.<ol.Feature> <optional>
Collection of edit features. If undefined, options.source must be set.
standalone boolean <optional>
Boolean indicating whether the Control can be activated together with other controls, like ole.Draw.
Source:

Extends

  • ol.control.Control

Members

(private) className :string

Html class name of the control button
Type:
  • string
Source:

(private) editor :ole.Editor

ole.Editor instance.
Type:
  • ole.Editor
Source:

(private) source :ol.source.Vector

Source with edit features.
Type:
  • ol.source.Vector
Source:

(private) standalone :Boolean

Type:
  • Boolean
Source:

(private) title :string

Control title.
Type:
  • string
Source:

Methods

activate()

Activate the control
Source:

deactivate()

Dectivate the control
Source:

getActive() → {Boolean}

Returns the active state of the control.
Source:
Returns:
Active state.
Type
Boolean

getElement() → {Element}

Returns the control's element.
Source:
Returns:
the control element.
Type
Element

(private) onClick()

Click handler for the control element.
Source:

(protected) setEditor(editor)

Introduce the control to it's editor.
Parameters:
Name Type Description
editor ole.Editor OLE Editor.
Source:

(protected) setMap(map)

Sets the map of the control.
Parameters:
Name Type Description
map ol.Map The map object.
Source: