Class: SyncLayertreeMap service:gmfSyncLayertreeMap

gmf.SyncLayertreeMap

new SyncLayertreeMap($rootScope, ngeoLayerHelper, ngeoWMSTime, gmfThemes)

Service to create layer based on a ngeo.LayertreeController with a GMFThemesGroup ou GMFThemesLeaf as node object. This layer is also used to synchronise a state of ngeo.LayertreeController and its corresponding layer in the map.

Parameters:
Name Type Description
$rootScope angular.Scope

Angular rootScope.

ngeoLayerHelper ngeo.LayerHelper

Ngeo Layer Helper.

ngeoWMSTime ngeo.WMSTime

wms time service.

gmfThemes gmf.Themes

The gmf Themes service.

Methods

(static) getLayer(treeCtrl)

Return the layer used by the given treeCtrl.

Parameters:
Name Type Description
treeCtrl ngeo.LayertreeController

ngeo layertree controller.

Returns:
ol.layer.Base

The layer.

createLayer(treeCtrl, map, dataLayerGroup, [opt_position]opt)

Create, insert (or update) and return a layer from the GmfGroup or the GmfLayer of the given treeCtrl.

Parameters:
Name Type Attributes Description
treeCtrl ngeo.LayertreeController

ngeo layertree controller.

map ol.Map

A map that contains the group to insert the not first level group layer.

dataLayerGroup ol.layer.Group

the layer group to insert the first level group layer.

[opt_position] number= <optional>

for first level Group, you can precise the position to add the group in the array of layers of the dataLayerGroup.

Returns: