Entity

new SuperMap3D.Entity(options)

An entity instance class that aggregates multiple visualization objects into a single high-level object. Entities can be manually created and added toViewer#entitiesin, or by the data source(Such as CzmlDataSourceandGeoJsonDataSource)generate.
Name Type Description
options Object optional Objects have the following properties:
Name Type Description
id String optional The unique identifier for the object. If not provided, a GUID is generated.
name String optional A human-readable name displayed to the user, which does not have to be unique.
show Boolean optional Whether to display entity objects and their children.
description Property optional An HTML description of the entity.
position PositionProperty optional The location of the entity.
orientation Property optional The orientation 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 A cylinder object associated with the entity.
ellipse EllipseGraphics optional The ellipse 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 rectangle object associated with the entity.
wall WallGraphics optional The fence object associated with the entity.
classificationType ClassificationType optional Whether a classification affects terrain, 3D Tiles or both
See:

Members

availability : TimeIntervalCollection

object availability. If availability is undefined, it is assumed that the object's other properties will return valid data at any time. Other properties of the object will only provide valid data for the interval given by the query if there is availability.

billboard : BillboardGraphics

Gets or sets the billboard object.

box : BoxGraphics

Gets or sets the cuboid object.

corridor : CorridorGraphics

Gets or sets the corridor object.

cylinder : CylinderGraphics

Gets or sets the cylinder object.

readonlydefinitionChanged : Event

Gets the event triggered when a property or sub-property is changed or modified.

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 for the entity.

isShowing : Boolean

Gets the visibility of this entity, taking into account the entity collection it belongs to as well as the visibility of the parent entity.

label : LabelGraphics

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 user use and does not need to be unique.

orientation : Property

Gets or sets the orientation of the entity.

parent : Entity

Gets or sets the entity's parent object.

path : PathGraphics

Gets or sets the path object.

point : PointGraphics

Gets or sets the point graphics 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

Gets or sets the position of the entity.

properties : PropertyBag

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

propertyNames : Array

Get all attribute names of the instance object.

rectangle : RectangleGraphics

Gets or sets the rectangle object.

show : Boolean

Get or set the visibility of the entity object. If set to true, this entity will only be displayed if its parent entity's show property is also set to true.

viewFrom : Property

Gets or sets the suggested initial offset for viewing this object with the camera. Offsets are defined in the "East-North-Up" coordinate system.

wall : WallGraphics

Get or set the fence object.

Methods

addProperty(propertyName)

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

isAvailable(time)Boolean

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

merge(source)

Assigns each unassigned property of the object the same property value as the source object.
Name Type Description
source Entity The object to be merged into the target object.

removeProperty(propertyName)

Removes the property name previously added by 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 Offset constant for polygons. When the value is positive, it means that the polygon is offset towards 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 scaling 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.