OpenLayers. Control

Controls affect the display or behavior of the map.  They allow everything from panning and zooming to displaying a scale indicator.

Summary
Controls affect the display or behavior of the map.
{String}
{OpenLayers.Map} this gets set in the addControl() function in OpenLayers.Map
{DOMElement}
{OpenLayers.Control.TYPES} Controls can have a ‘type’.
{string} This property is used for CSS related to the drawing of the Control.
{boolean} null
{<OpenLayers.Handler}> null
Create an OpenLayers Control.
Set the map property for the control.
{Boolean}
{Boolean}

Properties

id

{String}

map

{OpenLayers.Map} this gets set in the addControl() function in OpenLayers.Map

div

{DOMElement}

type

{OpenLayers.Control.TYPES} Controls can have a ‘type’.  The type determines the type of interactions which are possible with them when they are placed into a toolbar.

displayClass

{string} This property is used for CSS related to the drawing of the Control.

active

{boolean} null

handler

{<OpenLayers.Handler}> null

Functions

OpenLayers. Control

Create an OpenLayers Control.

Parameters

options{Object}

destroy

destroy: function ()

setMap

setMap: function(map)

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}

draw

draw: function (px)

Parameters

px{OpenLayers.Pixel}

Return

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

moveTo

moveTo: function (px)

Parameters

px{OpenLayers.Pixel}

activate

activate: function ()

Return

{Boolean}

deactivate

deactivate: function ()

Return

{Boolean}

destroy: function ()
setMap: function(map)
Set the map property for the control.
draw: function (px)
moveTo: function (px)
activate: function ()
{Boolean}
deactivate: function ()
{Boolean}