Hierarchy (View Summary)

Constructors

Properties

active: boolean
autoActivate: boolean
displayClass: string
div: HTMLElement
events: Events
handler: null | Handler
map: null | Map

Property: map {<OpenLayers.Map>} this gets set in the addControl() function in OpenLayers.Map

pinchDone: (
    evt: OpenlayersMouseEvent,
    start: {},
    last: { scale: number },
) => void
TYPE_BUTTON: 1

Constant: OpenLayers.Control.TYPE_BUTTON

TYPE_TOGGLE: 2

Constant: OpenLayers.Control.TYPE_TOGGLE

TYPE_TOOL: 3

Constant: OpenLayers.Control.TYPE_TOOL

Methods

  • APIMethod: activate Explicitly activates a control and it's associated handler if one has been set. Controls can be deactivated by calling the deactivate() method.

    Returns: {Boolean} True if the control was successfully activated or false if the control was already active.

    Returns boolean

  • APIMethod: deactivate Deactivates a control and it's associated handler if any. The exact effect of this depends on the control itself.

    Returns: {Boolean} True if the control was effectively deactivated or false if the control was already inactive.

    Returns boolean

  • Method: destroy The destroy method is used to perform any clean up before the control is dereferenced. Typically this is where event listeners are removed to prevent memory leaks.

    Returns void

  • Method: draw The draw method is called when the control is ready to be displayed on the page. If a div has not been created one is created. Controls with a visual component will almost always want to override this method to customize the look of control.

    Parameters: px - {<OpenLayers.Pixel>} The top-left pixel position of the control or null.

    Returns: {DOMElement} A reference to the DIV DOMElement containing the control

    Parameters

    Returns HTMLElement

  • Method: setMap Set the map property for the control. This is done through an accessor so that subclasses can override this and take special action once they have their map variable set.

    Parameters: map - {<OpenLayers.Map>}

    Parameters

    Returns void