MCPcopy
hub / github.com/CesiumGS/cesium / addCluster

Function addCluster

packages/engine/Source/DataSources/EntityCluster.js:143–161  ·  view source on GitHub ↗
(position, numPoints, ids, entityCluster)

Source from the content-addressed store, hash-verified

141}
142
143function addCluster(position, numPoints, ids, entityCluster) {
144 const cluster = {
145 billboard: entityCluster._clusterBillboardCollection.add(),
146 label: entityCluster._clusterLabelCollection.add(),
147 point: entityCluster._clusterPointCollection.add(),
148 };
149
150 cluster.billboard.show = false;
151 cluster.point.show = false;
152 cluster.label.show = true;
153 cluster.label.text = numPoints.toLocaleString();
154 cluster.label.id = ids;
155 cluster.billboard.position =
156 cluster.label.position =
157 cluster.point.position =
158 position;
159
160 entityCluster._clusterEvent.raiseEvent(ids, cluster);
161}
162
163function hasLabelIndex(entityCluster, entityId) {
164 return (

Callers 1

createDeclutterCallbackFunction · 0.85

Calls 1

addMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…