new Group( [options])
Parameters:
| Name | Type | Argument | Description | 
|---|---|---|---|
options | 
            
            Mapspace.layer.GroupOptions | 
                
                    <optional> | 
            
            
            Options.  | 
        
- Source:
 - mapspace/layer/group.js
 
Fires:
- ol.render.event:Event
 
Extends
- ol.layer.Group
 
Methods
- 
    
addLayers(properties, opt_silent)
 - 
    
    
Adds some layers using a
Mapspace.source.UserVectorLayerGroupProperties.Parameters:
Name Type Argument Description propertiesMapspace.source.UserVectorLayerGroupProperties Properties of layers to add.
opt_silentboolean <nullable> 
Optional silent mode. Addition is made in silent mode for each push of layers, avoiding triggering an excess of events. Only a change event is triggered if any change is made. This mode has a problem: viewers listenLayer method must be call manually for each layer added to finalize the listening of layers added.
- Source:
 - mapspace/layer/group.js
 
 - 
    
findGroup(path)
 - 
    
    
Finds the
Mapspace.layer.Groupwith the given path.Parameters:
Name Type Description pathstring Path with any pattern like
a/b/cwhere a, b, and c are group IDs.- Source:
 - mapspace/layer/group.js
 
Returns:
- Type
 - Mapspace.layer.Group
 
 - 
    
findLayer(path, name)
 - 
    
    
Finds the
ol.layer.Basewith the given path and name.Parameters:
Name Type Argument Description pathstring Path with any pattern like
a/b/cwhere a, b, and c are group IDs.namestring <nullable> 
Name of layer inside the given path. If null then the layer group with path is returned. If not, a sublayer is searched.
- Source:
 - mapspace/layer/group.js
 
Returns:
- Type
 - ol.layer.Base
 
 - 
    
getExpanded()
 - 
    
    
Returns a expanded property that is not serializable.
- Source:
 - mapspace/layer/group.js
 
Returns:
- Type
 - boolean
 
 - 
    
getGroupID()
 - 
    
    
Returns the layer group ID for this layer. The layer group ID is a unique number that identifies each layer group in Mapspace server for all clients.
- Source:
 - mapspace/layer/group.js
 
Returns:
- Type
 - number
 
 - 
    
getSourceDefinitionOfLayer(path, name)
 - 
    
    
Returns a
Mapspace.source.SourceDefinitionwith aMapspace.source.UserVectorLayerGroupPropertiesfor the layer in the given path and name. If the path and name are not found returns null. This function is useful to generate the source definition object needed to add a sublayer/subgroup to another layer group usingaddLayers.Parameters:
Name Type Argument Description pathstring Path.
namestring <nullable> 
Name. When path is of a subgroup or the group itself, then name should be null.
- Source:
 - mapspace/layer/group.js
 
Returns:
 - 
    
getVisibleLayersArray( [opt_array])
 - 
    
    
Returns the array of
ol.layer.Layerthat can be visible. This requires that the layer itself is visible and that all the layer groups in the path of the layer are visible.Parameters:
Name Type Argument Description opt_arrayArray.<ol.layer.Layer> <optional> 
Array of layers (to be modified in place).
- Source:
 - mapspace/layer/group.js
 
Returns:
Array of layers.
- Type
 - Array.<ol.layer.Layer>
 
 - 
    
setExpanded(expanded)
 - 
    
    
Saves an expanded property that is not serialized.
Parameters:
Name Type Description expandedboolean If layer group is expanded or not.
- Source:
 - mapspace/layer/group.js
 
 - 
    
updateValues()
 - 
    
    
Traverses tree of layers and ensures that layer groups have the correct level and path observable values.
- Source:
 - mapspace/layer/group.js