OpenLayers.Control.Panel

The Panel control is a container for other controls.  With it toolbars may be composed.

Inherits from

Summary
OpenLayers.Control.PanelThe Panel control is a container for other controls.
Properties
autoActivate{Boolean} Activate the control when it is added to a map.
defaultControl{OpenLayers.Control} The control which is activated when the control is activated (turned on), which also happens at instantiation.
Constructor
OpenLayers.Control.PanelCreate a new control panel.
Functions
destroy
activate
deactivate
activateControl
addControlsTo build a toolbar, you add a set of controls to it.
getControlsByGet a list of controls with properties matching the given criteria.
getControlsByNameGet a list of contorls with names matching the given name.
getControlsByClassGet a list of controls of a given type (CLASS_NAME).

Properties

autoActivate

{Boolean} Activate the control when it is added to a map.  Default is true.

defaultControl

{OpenLayers.Control} The control which is activated when the control is activated (turned on), which also happens at instantiation.

Constructor

OpenLayers.Control.Panel

Create a new control panel.

Parameters

options{Object} An optional object whose properties will be used to extend the control.

Functions

destroy

destroy: function()

activate

activate: function()

deactivate

deactivate: function()

activateControl

activateControl: function (control)

Parameters

control{OpenLayers.Control}

addControls

addControls: function(controls)

To build a toolbar, you add a set of controls to it. addControls lets you add a single control or a list of controls to the Control Panel.

Parameters

controls{OpenLayers.Control}

getControlsBy

getControlsBy: function(property,
match)

Get a list of controls with properties matching the given criteria.

Parameter

property{String} A control property to be matched.
match{String | Object} A string to match.  Can also be a regular expression literal or object.  In addition, it can be any object with a method named test.  For reqular expressions or other, if match.test(control[property]) evaluates to true, the control will be included in the array returned.  If no controls are found, an empty array is returned.

Returns

{Array(OpenLayers.Control)} A list of controls matching the given criteria.  An empty array is returned if no matches are found.

getControlsByName

getControlsByName: function(match)

Get a list of contorls with names matching the given name.

Parameter

match{String | Object} A control name.  The name can also be a regular expression literal or object.  In addition, it can be any object with a method named test.  For reqular expressions or other, if name.test(control.name) evaluates to true, the control will be included in the list of controls returned.  If no controls are found, an empty array is returned.

Returns

{Array(OpenLayers.Control)} A list of controls matching the given name.  An empty array is returned if no matches are found.

getControlsByClass

getControlsByClass: function(match)

Get a list of controls of a given type (CLASS_NAME).

Parameter

match{String | Object} A control class name.  The type can also be a regular expression literal or object.  In addition, it can be any object with a method named test.  For reqular expressions or other, if type.test(control.CLASS_NAME) evaluates to true, the control will be included in the list of controls returned.  If no controls are found, an empty array is returned.

Returns

{Array(OpenLayers.Control)} A list of controls matching the given type.  An empty array is returned if no matches are found.

Controls affect the display or behavior of the map.
destroy: function()
activate: function()
deactivate: function()
activateControl: function (control)
addControls: function(controls)
To build a toolbar, you add a set of controls to it.
getControlsBy: function(property,
match)
Get a list of controls with properties matching the given criteria.
getControlsByName: function(match)
Get a list of contorls with names matching the given name.
getControlsByClass: function(match)
Get a list of controls of a given type (CLASS_NAME).
Close