Skip to main content

Entity

Entity is a basic component for geographical data visualization.

Entity can have one each, with the following components as children:

Graphics components vs graphics properties

Conclusion: Graphics components are mostly recommended.

For example, Entity component has point property for point visualization. But PointGraphics component is also available. What is the differene?

<Entity point={{ pixelSize: 10 }} />

<Entity>
<BillboardGraphics pixelSize={10} />
</Entity>

That is same. However as changing only pixelSize property, situations will change. If you change point property, It happens recreating a PointGraphics object. It is equivalent to:

const entity = new Entity({ point: { pixelSize: 10 } });

// change pixelSize property in point property of Entity
entity.point = new PointGraphics({ pixelSize: 20 });
// change pixelSize property of PointGraphics
entity.point.pixelSize = 20;

Updating pixelSize of PointGraphics is more simple and fast.

Availability

Either:

  • Inside Viewer or CesiumWidget component: the entity will be attached to the EntityCollection of the Viewer or CesiumWidget.
  • Inside CustomDataSource component: the entity will be attached to the EntityCollection of the CustomDataSource.

Properties

Cesium properties

PropertyTypeDescription
positionCartesian3 | PositionProperty
showboolean
orientationProperty
ellipsoidEllipsoidGraphics | ConstructorOptions
propertiesPropertyBag | { [key: string]: any; }
namestring
entityCollectionEntityCollection
availabilityTimeIntervalCollection
parentEntity
billboardBillboardGraphics | ConstructorOptions
boxBoxGraphics | ConstructorOptions
corridorCorridorGraphics | ConstructorOptions
cylinderCylinderGraphics | ConstructorOptions
descriptionstring | Property
ellipseEllipseGraphics | ConstructorOptions
labelLabelGraphics | ConstructorOptions
modelModelGraphics | ConstructorOptions
tilesetCesium3DTilesetGraphics | ConstructorOptions
pathPathGraphics | ConstructorOptions
planePlaneGraphics | ConstructorOptions
pointPointGraphics | ConstructorOptions
polygonPolygonGraphics | ConstructorOptions
polylinePolylineGraphics | ConstructorOptions
polylineVolumePolylineVolumeGraphics | ConstructorOptions
rectangleRectangleGraphics | ConstructorOptions
viewFromProperty
wallWallGraphics | ConstructorOptions

Cesium read-only properties

PropertyTypeDescription
idstring

Cesium events

PropertyTypeDescription
onDefinitionChange() => void

Other properties

PropertyTypeDescription
onClick(movement: CesiumMovementEvent, target: T) => void
onDoubleClick(movement: CesiumMovementEvent, target: T) => void
onMouseDown(movement: CesiumMovementEvent, target: T) => void
onMouseUp(movement: CesiumMovementEvent, target: T) => void
onMiddleClick(movement: CesiumMovementEvent, target: T) => void
onMiddleDown(movement: CesiumMovementEvent, target: T) => void
onMiddleUp(movement: CesiumMovementEvent, target: T) => void
onMouseMove(movement: CesiumMovementEvent, target: T) => void
onPinchEnd(movement: CesiumMovementEvent, target: T) => void
onPinchMove(movement: CesiumMovementEvent, target: T) => void
onPinchStart(movement: CesiumMovementEvent, target: T) => void
onRightClick(movement: CesiumMovementEvent, target: T) => void
onRightDown(movement: CesiumMovementEvent, target: T) => void
onRightUp(movement: CesiumMovementEvent, target: T) => void
onMouseEnter(movement: CesiumMovementEvent, target: T) => void
onMouseLeave(movement: CesiumMovementEvent, target: T) => void
childrenReactNode
selectedbooleanIf true, the entity will be selected. It works only inside Viewer not CesiumWidget.
trackedbooleanIf true, the entity will be tracked by the camera. It works only inside Viewer not CesiumWidget.