Set ID.
Limit for push/length.
Array of underlying cartersian positions. When set, replaces all managed points as well.
Sets managed PointEntity color collectively.
Controls deletability for all points.
Hide all points while holding/dragging.
Return/set number of points (setter present for interface, does nothing).
All managed PointEntity scene objects. (Auto-generated from this.cartesians).
Controls reactivity for all points.
Controls PointEntity selection state for all points.
Controls show/hide for all managed PointEntity objects.
Enable for-of iteration over PointEntity objects in the set.
Destroy all managed PointEntities and clear internal lists. Use to remove from scene and clean up memory.
Call a callback for every point in the set.
Map every point in the set through a callback.
Calls callback whenever any point is moved.
Removes and destroys the last PointEntity.
Adds a PointEntity, if under maxPoints, and manages bidirectional linkage.
True if added, false otherwise.
Removes a specific point from the set and scene.
True if removed, false otherwise.
PointSet3D – Manages a mutable, interactive set of 3D points (Cartesian3) with live Cesium scene entities.
Automatically creates and destroys PointEntity primitives in Cesium for each position in the set. Supports iteration,
forEach
/map
APIs, maximum point constraints, push/pop/remove, and batch property changes (color, show, deletable, selectable, reactive). Coordinates (cartesians
) and PointEntity objects are automatically synchronized for editing by user/UI.Param: app
The Cesium app/viewer.
Param: options
Param: options.id
Unique set ID.
Param: options.cartesians
Initial array of Cartesian3 points.
Param: options.maxPoints
Maximum number of points allowed.
Param: options.color
Color applied to all points.
Param: options.selectable
If true, points can be interacted with by user.
Param: options.reactive
If true, points update/react adaptively.
Param: options.deletable
If true, points can be deleted.
Param: options.hideWhileHolding
If true, points hide when being moved.
Method
forEach(callback) - Calls callback for every PointEntity in the set.
Method
map(callback) - Maps every PointEntity to a new value.
Method
onMove(callback) - Register callback for move events on any point.
Method
push(PointEntity) - Adds a point if maxPoints constraint allows.
Method
pop() - Removes the last point.
Method
remove(PointEntity) - Removes a specific point.
Method
destroy() - Removes and destroys all PointEntity objects and clears this set.
Example