new vcs.vcm.layer.VectorCluster(options)
| Name | Type | Description |
|---|---|---|
options |
vcs.vcm.layer.VectorCluster.layerOptions |
Extends
Members
-
altitudeMode{string}
-
-
classificationType
-
-
className{string}
-
class Name of the Object
-
heightAboveGround{number}
-
height above ground for all point vector objects -> altitudeMode must be set to: "relativeToGround" either on the feature (precedence) or the layer
-
hiddenObjectIds{Array.<string>}
-
array of object Ids which should be hidden global, if this layer is active
-
name{string}
-
unique Name
-
skirt{number}
-
-
storeyHeight{number}
-
-
visibility{boolean}
-
-
zCoordinateEyeOffset{number}
-
All point vector objects become billboards in cesium which can contain an eyeOffset see: https://cesiumjs.org/Cesium/Build/Documentation/Billboard.html?classFilter=billboard
Methods
-
activate(active){Promise} inherited
-
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.
-
-
addFeatures(features){Array.<string>} inherited
-
add features to the vector layer and return an array with their ids. The geometry will be mutated and transformed to EPSG 3857 mercator coordinate system
Name Type Description featuresArray.<ol.Feature> - TODO
-
- mechanism to enforce XYZ coordinate layout for internal usage
-
addGenericFeatureProperties(properties) inherited
-
Set properties, which are always added to the generic object, eg. for use in balloons
Name Type Description propertiesObject -
clearHiddenObjects() inherited
-
clears all the hidden objects
-
clearHighlighting() inherited
-
clears all highlighted objects
-
clearStyle() inherited
-
Clears the style of this layer
-
dispose() inherited
-
disposes of this layer, removes instances from the current maps and the framework
-
getAltitudeMode(){string} inherited
-
returns the altitudeMode of the layer
- Deprecated
- Yes
-
getClassName(){string} inherited
-
returns the class name of this object.
- Deprecated
- Yes
Returns:
className
-
getConfigObject(){Object} inherited
-
-
getExclusiveGroup(){string} inherited
-
returns the exclusive group of this layer
- Deprecated
- Yes
-
getExtent(){vcs.vcm.util.Extent} inherited
-
returns the Extent of this layer
- Deprecated
- Yes
-
getFeatureById(id){ol.Feature} inherited
-
returns an feature if found, otherwise null feature geometries are always in EPSG 3857 mercator coordinate system
Name Type Description idstring | number -
getFeatures(){Array.<ol.Feature>} inherited
-
returns an array with features Feature geometries are always in EPSG 3857 mercator coordinate system
-
getFeaturesById(ids){Array.<ol.Feature>} inherited
-
returns an array with features feature geometries are always in EPSG 3857 mercator coordinate system
Name Type Description idsArray.<string> -
getHeightAboveGround(){number} inherited
-
returns the height above ground
- Deprecated
- Yes
-
getId(){string} inherited
-
returns the id of this object
- Deprecated
- Yes
-
getMaxResolution(){number} inherited
-
returns the maximum resolution (exclusive) below which this layer will be visible.
- Deprecated
- 3.5
-
getMinResolution(){number} inherited
-
returns the minimum resolution (inclusive) at which this layer will be visible.
- Deprecated
- 3.5
-
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
-
getProjection(){vcs.vcm.util.Projection} inherited
-
returns the source Projection
- Deprecated
- 3.5
-
getScaleByDistance(){Array.<number>} inherited
-
returns the scale By Distance
- Deprecated
- Yes
-
getSource(){ol.source.Vector} inherited
-
returns the ol3 vector source
-
getStyle(){vcs.vcm.util.style.VectorStyleItem} inherited
-
returns the style of the layer
- Deprecated
- 3.5
-
getType(){number} inherited
-
returns the type of this layer
- Deprecated
- Yes
-
getVcsMeta(options){vcs.vcm.layer.VcsMeta} inherited
-
Returns the layers vcsMeta object
Name Type Description optionsvcs.vcm.layer.GeoJSON.writeOptions -
getZCoordinateEyeOffset(){number} inherited
-
returns the amount of meters the features are being pulled forward in the direction of the viewer (in 3D)
- Deprecated
- Yes
-
getZIndex(){number} inherited
-
returns the zIndex of the layer
- Deprecated
- Yes
-
hideObjects(toHide) inherited
-
hides a number of objects
Name Type Description toHideArray.<(string|number)> A list of Object Ids which will be hidden
-
highlight(toHighlight) inherited
-
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} inherited
-
checks if the layer is active
- Deprecated
- Yes
-
isExclusive(){boolean} inherited
-
returns whether this layer can only be used exclusive
- Deprecated
- Yes
-
isIconManagerInUse(){boolean} inherited
-
returns whether this layer is used by the iconmanager
- Deprecated
- Yes
-
isInitialized(){boolean} inherited
-
returns true if the layer is initialized
- Deprecated
- Yes
-
isSupported(opt_map){boolean} inherited
-
checks if the currently active map supports this layer
Name Type Description mapvcs.vcm.maps.Map -
removeAllFeatures() inherited
-
removes all features from the vector layer
-
removeFeaturesById(ids) inherited
-
removes features from the vector layer
Name Type Description idsArray.<(string|number)> -
setHighlightStyle(style) inherited
-
sets the highlightstyle of this layer
Name Type Description styleol.style.Style | ol.StyleFunction | vcs.vcm.util.style.VectorStyleItem -
setProjection(projection) inherited
-
Sets a new source Projection for the layer. All features added hereafter are assumed to be in this projection
Name Type Description projectionvcs.vcm.util.Projection - Deprecated
- 3.5
-
setStyle(style, silent) inherited
-
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) inherited
-
unHides a number of objects
Name Type Description unHideArray.<(string|number)> A list of Object Ids which will be unHidden
-
unHighlight(toUnHighlight) inherited
-
unhighlights a number of building objects
Name Type Description toUnHighlightArray.<string> Array with IDS to unhighlight
-
unSelect()
-
Unselects the currently selected cluster
Type Definitions
-
vcs.vcm.layer.VectorCluster.layerItem{Object}
-
Properties:
Name Type Description namestring titleObject | string | null | undefined parentObject | string | null | undefined featureTemplatestring | null | undefined -
vcs.vcm.layer.VectorCluster.layerOptions
-
Properties:
Name Type Argument Default Description heightAboveGroundnumber <optional>
65 activeOnStartupboolean <optional>
true cluster layers are always active, this cannot be changed
altitudeModestring <optional>
none zCoordinateEyeOffsetnumber <optional>
-200 The distance (m) by which the vector objects are being pulled towards the viewer (3D only)
clusterDistancenumber <optional>
40 the distance (pixels) to cluster points by
clusterLayersArray.<vcs.vcm.layer.VectorCluster.layerItem> the layers to cluser
defaultFeatureTemplatestring an underscore template to render in the DOM when displaying a layerItem
showInContentboolean <optional>
true whether to show the clusters layerItems in the content window
stylevcs.vcm.layer.VectorCluster.styleOptions -
vcs.vcm.layer.VectorCluster.styleOptions{Object}
-
Properties:
Name Type Argument Default Description iconstring <optional>
images/clusterIcon.svg the resource to use as a cluster item, must be an SVG
selectedIconstring <optional>
images/clusterSelectedIcon.svg the resource to use as a selected cluster icon, must be an SVG
iconWidthnumber <optional>
40 iconHeightnumber <optional>
40 breaksArray.<number> <optional>
[2, 3, 4, 5, 10, 15, 20, 25] the classes and their sizes
iconScaleFactornumber <optional>
0.05 the factor by which to scale icons
zeroScaleOffsetnumber <optional>
3 the number of icons NOT to scale (by default 2, 3, 4, 5 have the same size)
fontSizenumber <optional>
16 the font size of the numbers within the icon
textOffsetnumber <optional>
-4 an offset to help center the text labels
Events
-
LAYER_ACTIVATED inherited
-
vcs.vcm.event.EventType.LAYER_ACTIVATED is triggered when a layer is activated.
Type:
-
LAYER_CHANGED inherited
-
vcs.vcm.event.EventType.LAYER_CHANGED is triggered when a layer is activated or deactivated.
Type:
-
LAYER_DEACTIVATED inherited
-
vcs.vcm.event.EventType.LAYER_DEACTIVATED is triggered when a layer is deactivated.
Type:
virtualcityMAP 3.6