new vcs.vcm.layer.Layer(options)
| Name | Type | Description |
|---|---|---|
options |
vcs.vcm.layer.Layer.Options |
Subclasses
- vcs.vcm.layer.cesium.AbstractCesiumTilesetLayer
- vcs.vcm.layer.cesium.Entities
- vcs.vcm.layer.cesium.Terrain
- vcs.vcm.layer.CommonLayer
- vcs.vcm.layer.oblique.ObliqueLayer
Extends
Members
-
className{string}
-
class Name of the Object
-
hiddenObjectIds{Array.<string>}
-
array of object Ids which should be hidden global, if this layer is active
-
name{string}
-
unique Name
Methods
-
activate(active){Promise}
-
Activates or deactivates this layer object, i.e. changes its internal view state and updates the map by calling show
Name Type Description activeboolean false or true activates or deactivates this layer
Fires:
-
LAYER_ACTIVATED(vcs.vcm.layer.Layer) - vcs.vcm.event.EventType.LAYER_ACTIVATED is triggered when a layer is activated. -
LAYER_CHANGED(vcs.vcm.layer.Layer) - vcs.vcm.event.EventType.LAYER_CHANGED is triggered when a layer is activated or deactivated. -
LAYER_DEACTIVATED(vcs.vcm.layer.Layer) - vcs.vcm.event.EventType.LAYER_DEACTIVATED is triggered when a layer is deactivated.
-
-
addGenericFeatureProperties(properties)
-
Set properties, which are always added to the generic object, eg. for use in balloons
Name Type Description propertiesObject -
clearHiddenObjects()
-
clears all the hidden objects
-
clearHighlighting()
-
clears all highlighted objects
-
clearStyle()
-
Clears the style of this layer
-
dispose()
-
disposes of this layer, removes instances from the current maps and the framework
-
getClassName(){string} inherited
-
returns the class name of this object.
- Deprecated
- Yes
Returns:
className
-
getConfigObject(){Object} inherited
-
-
getExclusiveGroup(){string}
-
returns the exclusive group of this layer
- Deprecated
- Yes
-
getExtent(){vcs.vcm.util.Extent}
-
returns the Extent of this layer
- Deprecated
- Yes
-
getId(){string} inherited
-
returns the id of this object
- Deprecated
- Yes
-
getName(){string} inherited
-
returns the name of the Object, the name is either given by the config Object or a uuid is generated
- Deprecated
- Yes
-
getType(){number}
-
returns the type of this layer
- Deprecated
- Yes
-
hideObjects(toHide)
-
hides a number of objects
Name Type Description toHideArray.<(string|number)> A list of Object Ids which will be hidden
-
highlight(toHighlight)
-
highlights a number of building objects with the given color
Name Type Description toHighlightObject.<string, (vcs.vcm.util.style.VectorStyleItem|Cesium.Color|ol.style.Style)> -
isActive(){boolean}
-
checks if the layer is active
- Deprecated
- Yes
-
isExclusive(){boolean}
-
returns whether this layer can only be used exclusive
- Deprecated
- Yes
-
isIconManagerInUse(){boolean}
-
returns whether this layer is used by the iconmanager
- Deprecated
- Yes
-
isInitialized(){boolean}
-
returns true if the layer is initialized
- Deprecated
- Yes
-
isSupported(opt_map){boolean}
-
checks if the currently active map supports this layer
Name Type Description mapvcs.vcm.maps.Map -
setStyle(style, silent)
-
Sets the style based on a styleName on a layer
Name Type Description stylestring | ol.style.Style | ol.StyleFunction | vcs.vcm.util.style.StyleItem silentboolean -
showObjects(unHide)
-
unHides a number of objects
Name Type Description unHideArray.<(string|number)> A list of Object Ids which will be unHidden
-
unHighlight(toUnHighlight)
-
unhighlights a number of building objects
Name Type Description toUnHighlightArray.<string> Array with IDS to unhighlight
Type Definitions
-
vcs.vcm.layer.Layer.Options
-
Properties:
Name Type Argument Default Description namestring the name of the layer, used to retrieve the layer from the framework
activeOnStartupboolean <optional>
false if true the layer will be activated on initialization
extentvcs.vcm.util.Extent | undefined extent of the layer
exclusiveboolean | string either true/false or a exclusive group, for example buildings. If two or more layers have the same exclusive group, only one layer can be active at the same time
mapNamesArray.<string> the map names on which this layer is shown, all if empty
allowPickingboolean <optional>
true whether to allow picking on this layer
urlstring | Object for most layers, a resource url will be needed
hiddenObjectIdsArray.<string> an array of building ids which should be hidden if this layer is active
stylevcs.vcm.util.style.DeclarativeStyleItem.Options | vcs.vcm.util.style.VectorStyleItem.Options | vcs.vcm.util.style.StyleItem | vcs.vcm.layer.VectorCluster.styleOptions | string | undefined genericFeaturePropertiesObject | undefined properties to add to generic features, eg for display in the balloon
Events
-
LAYER_ACTIVATED
-
vcs.vcm.event.EventType.LAYER_ACTIVATED is triggered when a layer is activated.
Type:
-
LAYER_CHANGED
-
vcs.vcm.event.EventType.LAYER_CHANGED is triggered when a layer is activated or deactivated.
Type:
-
LAYER_DEACTIVATED
-
vcs.vcm.event.EventType.LAYER_DEACTIVATED is triggered when a layer is deactivated.
Type:
virtualcityMAP 3.6