bruce-cesium 2.1.7 → 2.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,98 @@
1
+ import * as Cesium from "cesium";
2
+ import { VisualsRegister } from "../../visuals-register";
3
+ export declare class PointClustering {
4
+ private quadTree;
5
+ private prevClusteredEntities;
6
+ private currClusteredEntities;
7
+ private distanceBetweenClusters;
8
+ private viewer;
9
+ private register;
10
+ private updateQueue;
11
+ private clusterEntities;
12
+ private disposed;
13
+ private listenCameraRemoval;
14
+ private menuItemId;
15
+ private registeredEntityIds;
16
+ private pointColorBg;
17
+ private pointColorTxt;
18
+ private iconUrl;
19
+ constructor(register: VisualsRegister.Register, menuItemId: string);
20
+ /**
21
+ * Starts listening to camera changes.
22
+ * This will trigger the clustering update whenever camera is moved.
23
+ */
24
+ private listenCamera;
25
+ /**
26
+ * Stops listening to camera changes.
27
+ */
28
+ private unlistenCamera;
29
+ /**
30
+ * Removes all clusters and updates entities to no longer be suppressed.
31
+ * @returns
32
+ */
33
+ Dispose(): void;
34
+ /**
35
+ * Calculates center of given points.
36
+ * @param points
37
+ * @returns
38
+ */
39
+ private calculateCentroid;
40
+ /**
41
+ * Gathers current clusters and renders them.
42
+ * @returns
43
+ */
44
+ private doUpdate;
45
+ /**
46
+ * Updates how apart clusters can be based on camera distance.
47
+ * @param cameraHeight
48
+ */
49
+ private updateClusterSpacing;
50
+ /**
51
+ * Gathers clusters.
52
+ * @returns
53
+ */
54
+ private getClusters;
55
+ /**
56
+ * Merges clusters that are nearby based on the distanceBetweenClusters value.
57
+ * @param clusters
58
+ * @returns
59
+ */
60
+ private mergeClusters;
61
+ /**
62
+ * Removes Cesium cluster entity.
63
+ * @param clusterId
64
+ */
65
+ private removeClusterEntity;
66
+ private convertCartesianToCartographic;
67
+ /**
68
+ * Adds new entity to the clustering logic.
69
+ * @param id Bruce entity ID.
70
+ * @param cartesian3 entity's position.
71
+ */
72
+ private addPoint;
73
+ /**
74
+ * Calculates rough distance across earth between two points.
75
+ * @param lon1
76
+ * @param lat1
77
+ * @param lon2
78
+ * @param lat2
79
+ * @returns
80
+ */
81
+ private calculateDistance;
82
+ /**
83
+ * Adds entity to clustering logic.
84
+ * Will return false if entity could not be clustered and therefor should not be hidden.
85
+ * @param id
86
+ * @param entity
87
+ * @returns
88
+ */
89
+ AddEntity(id: string, entity: Cesium.Entity): boolean;
90
+ /**
91
+ * Removes entity from clustering logic.
92
+ * Warning: This will not reveal the entity, suppressShow will remain true.
93
+ * This is made with the assumption that the entity is being removed from viewer.
94
+ * @param id
95
+ * @returns
96
+ */
97
+ RemoveEntity(id: string): void;
98
+ }
@@ -19,6 +19,7 @@ export declare namespace EntitiesIdsRenderManager {
19
19
  get Disposed(): boolean;
20
20
  private renderedEntities;
21
21
  private visualsManager;
22
+ private clustering;
22
23
  constructor(params: {
23
24
  viewer: Cesium.Viewer;
24
25
  register: VisualsRegister.Register;
@@ -28,6 +28,7 @@ export declare namespace EntitiesRenderManager {
28
28
  private viewMonitorRemoval;
29
29
  private renderQueue;
30
30
  private renderQueueInterval;
31
+ private clustering;
31
32
  constructor(params: {
32
33
  viewer: Cesium.Viewer;
33
34
  register: VisualsRegister.Register;
@@ -21,6 +21,7 @@ export declare namespace VisualsRegister {
21
21
  best?: boolean;
22
22
  stale?: boolean;
23
23
  opacity?: number;
24
+ suppressShow?: boolean;
24
25
  }
25
26
  enum EVisualUpdateType {
26
27
  Add = "ADD",
@@ -50,6 +51,9 @@ export declare namespace VisualsRegister {
50
51
  private opacity;
51
52
  private selectionColor;
52
53
  constructor(viewer: Cesium.Viewer);
54
+ ForceUpdate(params: {
55
+ entityIds: string[];
56
+ }): void;
53
57
  SetSelectionColor(color: Cesium.Color): void;
54
58
  SetSelected(params: {
55
59
  selected: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bruce-cesium",
3
- "version": "2.1.7",
3
+ "version": "2.1.9",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "main": "dist/bruce-cesium.umd.js",
@@ -71,7 +71,7 @@
71
71
  "typescript": "^5.0.4"
72
72
  },
73
73
  "dependencies": {
74
- "bruce-models": "^2.6.0",
74
+ "bruce-models": "^2.6.1",
75
75
  "tslib": "^2.4.1"
76
76
  }
77
77
  }