Class ViewerLayersToolbar

This class is the Layer Toolbar on the left of the viewer screen.

Source : file toolbars/viewerLayersToolbar/ViewerLayersToolbar.js at line 43

Constructor

new ViewerLayersToolbar ( )

The constructor

Source : file toolbars/viewerLayersToolbar/ViewerLayersToolbar.js at line 63

Public methods

addMapLayers ( jsonLayers )

Add a layer list to the list of available layers

Source : file toolbars/viewerLayersToolbar/ViewerLayersToolbar.js at line 166

Parameters

Name Type Description
jsonLayers JsonObject

The layer list to add

createUI ( )

Creates the user interface

Source : file toolbars/viewerLayersToolbar/ViewerLayersToolbar.js at line 90

setMapLayer ( layerName )

Set a layer as background map. If the layer is not found, the 'OSM - Color' layer is set

Source : file toolbars/viewerLayersToolbar/ViewerLayersToolbar.js at line 150

Parameters

Name Type Description
layerName String

The name of the layer to set or the index of theMapLayer in the #mapLayers

Private properties

#mapLayers : Array of MapLayer

An array with the available MapLayer objects

Source : file toolbars/viewerLayersToolbar/ViewerLayersToolbar.js at line 57

#mapLayersToolbar : HTMLElement

The toolbar

Source : file toolbars/viewerLayersToolbar/ViewerLayersToolbar.js at line 50