Class: SyncLayertreeMap service:gmfSyncLayertreeMap

gmf.layertree.SyncLayertreeMap

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

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

Parameters:
Name Type Description
$rootScope angular.Scope

Angular rootScope.

ngeoLayerHelper ngeo.map.LayerHelper

Ngeo Layer Helper.

ngeoWMSTime ngeo.misc.WMSTime

wms time service.

gmfThemes gmf.theme.Themes

The gmf Themes service.

Members

(static, non-null) module: angular.Module

Methods

(static) getLayer(treeCtrl)

Return the layer used by the given treeCtrl.

Parameters:
Name Type Description
treeCtrl ngeo.layertree.Controller

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.layertree.Controller

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: