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
Section titled â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 Entityentity.point = new PointGraphics({ pixelSize: 20 });// change pixelSize property of PointGraphicsentity.point.pixelSize = 20;Updating pixelSize of PointGraphics is more simple and fast.
Availability
Section titled â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
Section titled âPropertiesâCesium properties
Section titled âCesium propertiesâ| Property | Type | Description |
|---|---|---|
| position | Cartesian3 | PositionProperty | CallbackPositionProperty | undefined | |
| show | boolean | undefined | |
| orientation | Property | Quaternion | undefined | |
| properties | PropertyBag | { [key: string]: any; } | undefined | |
| ellipsoid | EllipsoidGraphics | ConstructorOptions | undefined | |
| name | string | undefined | |
| entityCollection | EntityCollection | |
| availability | TimeIntervalCollection | undefined | |
| trackingReferenceFrame | TrackingReferenceFrame | undefined | |
| parent | Entity | undefined | |
| billboard | BillboardGraphics | ConstructorOptions | undefined | |
| box | BoxGraphics | ConstructorOptions | undefined | |
| corridor | CorridorGraphics | ConstructorOptions | undefined | |
| cylinder | CylinderGraphics | ConstructorOptions | undefined | |
| description | string | Property | undefined | |
| ellipse | EllipseGraphics | ConstructorOptions | undefined | |
| label | LabelGraphics | ConstructorOptions | undefined | |
| model | ModelGraphics | ConstructorOptions | undefined | |
| tileset | Cesium3DTilesetGraphics | ConstructorOptions | undefined | |
| path | PathGraphics | ConstructorOptions | undefined | |
| plane | PlaneGraphics | ConstructorOptions | undefined | |
| point | PointGraphics | ConstructorOptions | undefined | |
| polygon | PolygonGraphics | ConstructorOptions | undefined | |
| polyline | PolylineGraphics | ConstructorOptions | undefined | |
| polylineVolume | PolylineVolumeGraphics | ConstructorOptions | undefined | |
| rectangle | RectangleGraphics | ConstructorOptions | undefined | |
| viewFrom | Cartesian3 | Property | undefined | |
| wall | WallGraphics | ConstructorOptions | undefined |
Cesium read-only properties
Section titled âCesium read-only propertiesâ| Property | Type | Description |
|---|---|---|
| id | string |
Cesium events
Section titled âCesium eventsâ| Property | Type | Description |
|---|---|---|
| onDefinitionChange | (() => void) | undefined |
Other properties
Section titled âOther propertiesâN/A