oscar.Control.ThemeSwitcher

Summary
oscar.Control.ThemeSwitcher
Properties
activeColor{String}
themeStates{Array(Object)} Contains a theme name and a pointer to the themes label in the theme switcher
dataLbl{DOMElement}
dataLayersDiv{DOMElement}
dataLayers{Array(<OpenLayers.Layer>)}
minimizeDiv{DOMElement}
maximizeDiv{DOMElement}
Functions
OpenLayers.Control.LayerSwitcher
draw{DOMElement} A reference to the DIV DOMElement containing the switcher tabs.
loadContentsSet up the labels and divs for the control
checkRedrawChecks if the layer state has changed since the last redraw() call.
redrawGoes through and takes the current state of the Map and rebuilds the control to display that state.
ignoreEvent
mouseDownRegister a local ‘mouseDown’ flag so that we’ll know whether or not to ignore a mouseUp event
mouseUpIf the ‘isMouseDown’ flag has been set, that means that the drag was started from within the LayerSwitcher control, and thus we can ignore the mouseup.

Properties

activeColor

{String}

themeStates

{Array(Object)} Contains a theme name and a pointer to the themes label in the theme switcher

dataLbl

{DOMElement}

dataLayersDiv

{DOMElement}

dataLayers

{Array(<OpenLayers.Layer>)}

minimizeDiv

{DOMElement}

maximizeDiv

{DOMElement}

Functions

OpenLayers.Control.LayerSwitcher

Parameters

options{Object}

draw

draw: function()

Returns

{DOMElement} A reference to the DIV DOMElement containing the switcher tabs.

loadContents

loadContents: function()

Set up the labels and divs for the control

checkRedraw

checkRedraw: function()

Checks if the layer state has changed since the last redraw() call.

Returns

{Boolean} The layer state changed since the last redraw() call.

redraw

redraw: function()

Goes through and takes the current state of the Map and rebuilds the control to display that state.  Groups base layers into a radio-button group and lists each data layer with a checkbox.

Returns

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

ignoreEvent

ignoreEvent: function(evt)

Parameters

evt{Event}

mouseDown

mouseDown: function(evt)

Register a local ‘mouseDown’ flag so that we’ll know whether or not to ignore a mouseUp event

Parameters

evt{Event}

mouseUp

mouseUp: function(evt)

If the ‘isMouseDown’ flag has been set, that means that the drag was started from within the LayerSwitcher control, and thus we can ignore the mouseup.  Otherwise, let the Event continue.

Parameters

evt{Event}
draw: function()
{DOMElement} A reference to the DIV DOMElement containing the switcher tabs.
loadContents: function()
Set up the labels and divs for the control
checkRedraw: function()
Checks if the layer state has changed since the last redraw() call.
redraw: function()
Goes through and takes the current state of the Map and rebuilds the control to display that state.
ignoreEvent: function(evt)
mouseDown: function(evt)
Register a local ‘mouseDown’ flag so that we’ll know whether or not to ignore a mouseUp event
mouseUp: function(evt)
If the ‘isMouseDown’ flag has been set, that means that the drag was started from within the LayerSwitcher control, and thus we can ignore the mouseup.