Entity

new Cesium.Entity(options)

Entity instance class, which aggregates multiple visual objects into a single high-level object. Entities can be manually created and added to Viewer#entities, or generated by datasources (such as CzmlDataSource and GeoJsonDataSource).
Name Type Description
options Object optional The object has the following properties:
Name Type Default Description
id String optional The unique identifier of the object. If not provided, a GUID is generated.
name String optional The human-readable name displayed to the user, the name does not have to be unique.
show Boolean optional Whether to display the entity object and its children.
description Property optional The HTML description of the entity.
position PositionProperty optional The location of the entity.
orientation Property optional The direction of the entity.
viewFrom Property optional View the suggested initial offset for this entity object.
parent Entity optional The parent entity associated with this entity.
billboard BillboardGraphics optional The billboard associated with this entity.
box BoxGraphics optional The box object associated with this entity.
corridor CorridorGraphics optional The corridor object associated with the entity.
cylinder CylinderGraphics optional The cylinder object associated with the entity.
ellipse EllipseGraphics optional The elliptical object associated with the entity.
ellipsoid EllipsoidGraphics optional The ellipsoid object associated with the entity.
label LabelGraphics optional The label object associated with the entity.
model ModelGraphics optional The model object associated with the entity.
path PathGraphics optional The path object associated with the entity.
point PointGraphics optional The point object associated with the entity.
polygon PolygonGraphics optional The polygon object associated with the entity.
polyline PolylineGraphics optional The polyline object associated with the entity.
polylineVolume PolylineVolumeGraphics optional The polyline cylinder object associated with the entity.
rectangle RectangleGraphics optional The rectangular object associated with the entity.
wall WallGraphics optional The wall object associated with the entity.
clampToS3M Boolean false optional When true, polygon will clamp to s3m model.
See:

Members

availability : TimeIntervalCollection

Object availability. If availability is not defined, it is assumed that other attributes of the object will return valid data at any time. If availability exists, other attributes of the object will only provide valid data within the time interval given by the query.

billboard : BillboardGraphics

Get or set the billboard object.

box : BoxGraphics

Gets or sets the cuboid object.

corridor : CorridorGraphics

Get or set the corridor object.

cylinder : CylinderGraphics

Gets or sets the cylinder object.

readonlydefinitionChanged : Event

Gets the event triggered when the attribute or sub-attribute changes.

description : Property

Get or set the entity description.

ellipse : EllipseGraphics

Gets or sets the ellipse object.

ellipsoid : EllipsoidGraphics

Gets or sets the ellipsoid object.

entityCollection : EntityCollection

Gets or sets the entity collection to which the current entity belongs.

id : String

Get the unique identifier of the entity.

isShowing : Boolean

Get the visibility of this entity. This visibility attribute takes into account the visibility of the entity set to which it belongs and the visibility of the parent entity.

label : LabelGraphics

Get or set the label.Get or set the label.

model : ModelGraphics

Get or set the model object.

name : String

Gets or sets the name of the object. The name is for end users, and the name does not need to be unique.

orientation : Property

Get or set the direction of the entity.

parent : Entity

Gets or sets the parent object of the entity.

path : PathGraphics

Get or set the path object.

point : PointGraphics

Get or set the point graphic object.

polygon : PolygonGraphics

Gets or sets the polygon object.

polyline : PolylineGraphics

Gets or sets the polyline object.

polylineVolume : PolylineVolumeGraphics

Gets or sets the polyline cylinder object.

position : PositionProperty

Get or set the location of the entity.

properties : PropertyBag

Get or set any property bag associated with the entity object.

propertyNames : Array

Get all the attribute names of the instance object.

rectangle : RectangleGraphics

Gets or sets the rectangle object.

show : Boolean

Gets or sets the visibility of the entity object. If set to true, the entity will only be displayed when the show attribute of its parent entity is also set to true.

viewFrom : Property

Gets or sets the recommended initial offset when viewing this object with the camera. The offset is defined in the "East-North-Up" coordinate system.

wall : WallGraphics

Get or set the fence object.

Methods

addProperty(propertyName)

Add an attribute to the entity.
Name Type Description
propertyName String The name of the attribute to be added.
Throws:

isAvailable(time)Boolean

The specified time, if the object contains data within the specified time, it returns true.
Name Type Description
time JulianDate Time to check availability.
Returns:
If the object contains data within the specified time, it returns true, otherwise it returns false.

merge(source)

Each unassigned attribute of the object is assigned the same attribute value as the source object.
Name Type Description
source Entity The object to be merged into the target object.

removeProperty(propertyName)

Delete the property name previously added through the addProperty function.
Name Type Description
propertyName String The name of the property to remove.
Throws:

setPolygonOffset(polyOffsetFactor, polyOffsetUnits)

Set the Entity polygon offset (currently only supports faces).
Name Type Description
polyOffsetFactor Number The offset constant of the polygon. When the value is positive, it means that the polygon is offset to the outside of the screen, and when it is negative, it means that it is offset towards the inside of the screen.
polyOffsetUnits Number Polygon scaling factor. The polygon zoom factor and the offset constant jointly determine the offset of the polygon object in the depth direction of the screen, which can be used to solve the problem of flickering when polygons overlap.