Entity
Entity
is a basic component for geographical data visualization.
Entity can have one each, with the following components as children:
EntityDescription
: renders description with ReactBillboardGraphics
: a billboard visualizationBoxGraphics
: a box visualizationCorridorGraphics
: a corridor visualizationCylinderGraphics
: a cylinder visualizationEllipseGraphics
: a ellipse visualizationEllipsoidGraphics
: a ellipsoid visualizationLabelGraphics
: a label visualizationModelGraphics
: a model visualizationPathGraphics
: a path visualizationPlaneGraphics
: a plane visualizationPointGraphics
: a point visualizationPolygonGraphics
: a polygon visualizationPolylineGraphics
: a polyline visualizationPolylineVolumeGraphics
: a polyline visualization with volumeRectangleGraphics
: a rectangle visualizationWallGraphics
: a wall visualization
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
Property | Type | Description |
---|---|---|
position | Cartesian3 | PositionProperty | |
show | boolean | |
orientation | Property | |
ellipsoid | EllipsoidGraphics | ConstructorOptions | |
properties | PropertyBag | { [key: string]: any; } | |
name | string | |
entityCollection | EntityCollection | |
availability | TimeIntervalCollection | |
parent | Entity | |
billboard | BillboardGraphics | ConstructorOptions | |
box | BoxGraphics | ConstructorOptions | |
corridor | CorridorGraphics | ConstructorOptions | |
cylinder | CylinderGraphics | ConstructorOptions | |
description | string | Property | |
ellipse | EllipseGraphics | ConstructorOptions | |
label | LabelGraphics | ConstructorOptions | |
model | ModelGraphics | ConstructorOptions | |
tileset | Cesium3DTilesetGraphics | ConstructorOptions | |
path | PathGraphics | ConstructorOptions | |
plane | PlaneGraphics | ConstructorOptions | |
point | PointGraphics | ConstructorOptions | |
polygon | PolygonGraphics | ConstructorOptions | |
polyline | PolylineGraphics | ConstructorOptions | |
polylineVolume | PolylineVolumeGraphics | ConstructorOptions | |
rectangle | RectangleGraphics | ConstructorOptions | |
viewFrom | Property | |
wall | WallGraphics | ConstructorOptions |
Cesium read-only properties
Property | Type | Description |
---|---|---|
id | string |
Cesium events
Property | Type | Description |
---|---|---|
onDefinitionChange | () => void |
Other properties
Property | Type | Description |
---|---|---|
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 | |
children | ReactNode | |
selected | boolean | If true, the entity will be selected. It works only inside Viewer not CesiumWidget. |
tracked | boolean | If true, the entity will be tracked by the camera. It works only inside Viewer not CesiumWidget. |