The Panel control is a container for other controls. With it toolbars may be composed.
OpenLayers. | The 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. | Create a new control panel. |
Functions | |
destroy | |
activate | |
deactivate | |
activateControl | |
addControls | To build a toolbar, you add a set of controls to it. |
getControlsBy | Get a list of controls with properties matching the given criteria. |
getControlsByName | Get a list of contorls with names matching the given name. |
getControlsByClass | Get a list of controls of a given type (CLASS_NAME). |
{OpenLayers.Control} The control which is activated when the control is activated (turned on), which also happens at instantiation.
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.
controls | {OpenLayers.Control} |
getControlsBy: function( property, match )
Get a list of controls with properties matching the given criteria.
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. |
{Array(OpenLayers.Control)} A list of controls matching the given criteria. An empty array is returned if no matches are found.
getControlsByName: function( match )
Get a list of contorls with names matching the given name.
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. |
{Array(OpenLayers.Control)} A list of controls matching the given name. An empty array is returned if no matches are found.
getControlsByClass: function( match )
Get a list of controls of a given type (CLASS_NAME).
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. |
{Array(OpenLayers.Control)} A list of controls matching the given type. An empty array is returned if no matches are found.
destroy: function()
activate: function()
deactivate: function()
activateControl: function ( control )
To build a toolbar, you add a set of controls to it.
addControls: function( controls )
Get a list of controls with properties matching the given criteria.
getControlsBy: function( property, match )
Get a list of contorls with names matching the given name.
getControlsByName: function( match )
Get a list of controls of a given type (CLASS_NAME).
getControlsByClass: function( match )