LayerProvider

LayerProvider

This provider (singleton) controls the display of all layers

Constructor

new LayerProvider()

Source:

Extends

  • EventTarget

Members

activeLayers

Description:
  • Getter

Source:

Getter

(private) activeLayers_ :Map.<string, (string|null)>

Description:
  • List of open/shown layer types

Source:

List of open/shown layer types

Type:
  • Map.<string, (string|null)>

(private) layers_ :Array.<LayerModel>

Description:
  • List of LayerModel in use If a new layer is added it must be added here with type and name.

Source:

List of LayerModel in use If a new layer is added it must be added here with type and name.

Type:
Example
this.layers_.push(new LayerModel(LayerType.NEWS, 'news'));

Methods

getLayerByName(name) → {LayerModel}

Description:
  • Finds and returns a LayerModel with a given name.

Source:
Parameters:
Name Type Description
name string
Returns:
Type
LayerModel

hide(name)

Description:
  • Hide a specific layer. If no name is specified, all active layers are hidden. The LayerEventType HIDE_LAYER will be fired.

Source:
Parameters:
Name Type Default Description
name string | null null

isOpen(name) → {boolean}

Description:
  • Checked if a specific layer with the name is open. If no name is specified, it is checked whether any layer is open in general.

Source:
Parameters:
Name Type Default Description
name string | null null
Returns:
Type
boolean

show(name, dataopt)

Description:
  • Displays the layer whose model name corresponds to the specified name. Optionally, a data object can be passed to the open layer by events. When the layer is reopened LayerEventType SHOW_LAYER is fired. If this layer is already open LayerEventType UPDATE_LAYER. A class is also added to the document element specifying which LayerType is currently open. (e.g. has-open-visitor-layer)

Source:
Parameters:
Name Type Attributes Default Description
name string
data * <optional>
null