oscar.Control.ThemeManager

Inherits from:<OpenLayers.Control>

Description: This control handles the drawing of theme layers onto a map object.

Summary
oscar.Control.ThemeManager
Properties
themes Array - List of themes for the map.
Functions
ignoreEvent
setMap Set the map property for the control.  This is done throughan accessor so that subclasses can override this and take special action once they have their map variable set.
setConfigManagerSets the config manager used to load an OXF source.
setGuiManagerSets the gui manager to use if there is to be a visual display of themes.
applyThemesGets triggered from the configuration manager object.
addThemeThis method takes a theme object and adds it to the theme manager.
themeAddedThis method gets triggered when a theme is added.
drawCalled by the parent Control class.
containerCreatedThis method gets called when the control container is created to notify the gui mananager.
themeActivatedThis method is triggered when a theme is activated and calls the drawTheme method.
drawThemeThis method will take in a theme object and draw the layer of the theme on to the map.

Properties

themes Array - List of themes for the map.

Functions

ignoreEvent

ignoreEvent : function(evt)
Parameters: evt{Event}

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>}

setConfigManager

setConfigManager : function(cm)

Sets the config manager used to load an OXF source.  This will register event calls to applyThemes when the configuration manger triggers a haveThemes event.

setGuiManager

setGuiManager : function(gui)

Sets the gui manager to use if there is to be a visual display of themes.  This method will trigger themeActivated when the gui manager triggers its themeActivated event.

applyThemes

applyThemes : function()

Gets triggered from the configuration manager object.  This method loops through the themes and calls addTheme.

addTheme

addTheme : function(themeObj)

This method takes a theme object and adds it to the theme manager.

themeAdded

themeAdded : function(themeObj)

This method gets triggered when a theme is added.  If a gui manager is available it will call the addTheme method of the gui manager passing the theme object.

draw

draw : function()

Called by the parent Control class.  Draws the container to the screen.

containerCreated

containerCreated : function()

This method gets called when the control container is created to notify the gui mananager.

themeActivated

themeActivated : function(e)

This method is triggered when a theme is activated and calls the drawTheme method.

drawTheme

drawTheme : function(theme)

This method will take in a theme object and draw the layer of the theme on to the map.

ignoreEvent : function(evt)
setConfigManager : function(cm)
Sets the config manager used to load an OXF source.
setGuiManager : function(gui)
Sets the gui manager to use if there is to be a visual display of themes.
applyThemes : function()
Gets triggered from the configuration manager object.
addTheme : function(themeObj)
This method takes a theme object and adds it to the theme manager.
themeAdded : function(themeObj)
This method gets triggered when a theme is added.
draw : function()
Called by the parent Control class.
containerCreated : function()
This method gets called when the control container is created to notify the gui mananager.
themeActivated : function(e)
This method is triggered when a theme is activated and calls the drawTheme method.
drawTheme : function(theme)
This method will take in a theme object and draw the layer of the theme on to the map.