Class: Entity

og/entity/Entity~Entity

Entity instances aggregate multiple forms of visualization into a single high-level object. They can be created manually and added to entity collection.

new Entity(options)

Name Type Description
options Object optional Entity options:
Name Type Description
name string optional A human readable name to display to users. It does not have to be unique.
cartesian og.Vec3 | Array.<number> optional Spatial entities like billboard, label, sphere etc. cartesian position.
lonlat og.LonLat optional Geodetic coordiantes for an entities like billboard, label, sphere etc.
aground boolean optional True for entities that have to be placed on the relief.
visibility boolean optional Entity visibility.
billboard * optional Billboard options(see og.Billboard).
label * optional Label options(see og.Label).
sphere * optional Sphere options(see og.shape.Sphere).
box * optional Sphere options(see og.shape.Box).
Polyline * optional Polyline options(see og.Polyline).
pointCloud * optional Point cloud options(see og.PointCloud).
geometry * optional Geometry options (see og.Geometry), available for vector layer only.
properties * optional Entity custom properties.

Members

protected_altitudenumber

Entity visible terrain altitude.

protected_cartesianog.Vec3

Entity cartesian position.

protected_entityCollectionog.EntityCollection

Entity collection that this entity belongs to.

protected_entityCollectionIndexnumber

Entity collection array store index.

protected_layerog.layer.Vector

Assigned vector layer pointer.

protected_layerIndexnumber

Assigned vector layer entity array index.

protected_lonlatog.LonLat

Geodetic entity coordiantes.

protected_lonlatMercog.LonLat

World Mercator entity coordinates.

protected_pickingColorog.Vec3

Picking color.

protected_visibilityboolean

Visibility flag.

billboardog.Billboard

Billboard entity.

childrenNodesArray.<og.Entity>

Children entities.

geometryog.Geometry

Geometry entity(available only for vector layer).

readonlyid

Unic identifier.

labelog.Label

Text label entity.

parentog.Entity

Parent entity.

pointCloudog.PointCloud

PointCloud entity.

polylineog.Polyline

Polyline entity.

propertiesObject

Entity user defined properties.

shapeog.shape.BaseShape

Shape entity.

Methods

protected_setCartesian3vSilent(cartesian)

Sets entity cartesian position without moveentity event dispatching.
Name Type Description
cartesian og.Vec3 Cartesian position in 3d space.

addTo(collection, rightNow){og.Entity}

Adds current entity into the specified entity collection.
Name Type Default Description
collection og.EntityCollection | og.layer.Vector Specified entity collection or vector layer.
rightNow Boolean false optional Entity insertion option for vector layer.
Returns:
Type Description
og.Entity - This object.

appendChild(entity)

Append child entity.
Name Type Description
entity og.Entity Child entity.

getCartesian(){og.Vec3}

Returns carteain position.
Returns:
Type Description
og.Vec3 -

getExtent(){og.Extent}

Return geodethic extent.
Returns:
Type Description
og.Extent -

getLonLat(){og.LonLat}

Gets entity geodetic coordinates.
Returns:
Type Description
og.LonLat -

getVisibility(){boolean}

Returns entity visibility.
Returns:
Type Description
boolean -
Removes current entity from collection and layer.

setAltitude(altitude)

Sets entity altitude over the planet.
Name Type Description
altitude number Altitude.

setBillboard(billboard){og.Billboard}

Sets entity billboard.
Name Type Description
billboard og.Billboard Billboard object.
Returns:
Type Description
og.Billboard -

setCartesian(x, y, z)

Sets entity cartesian position.
Name Type Description
x number 3d space X - position.
y number 3d space Y - position.
z number 3d space Z - position.

setCartesian3v(cartesian)

Sets entity cartesian position.
Name Type Description
cartesian og.Vec3 Cartesian position in 3d space.

setGeometry(geometry){og.Geometry}

Sets entity geometry.
Name Type Description
geometry og.Geometry Geometry object.
Returns:
Type Description
og.Geometry -

setLabel(label){og.Label}

Sets entity label.
Name Type Description
label og.Label Text label.
Returns:
Type Description
og.Label -

setLonLat(lonlat)

Sets geodetic coordinates of the entity point object.
Name Type Description
lonlat og.LonLat WGS84 coordinates.

setPickingColor()

Appends entity items(billboard, label etc.) picking color.

setPointCloud(pointCloud){og.PointCloud}

Sets entity pointCloud.
Name Type Description
pointCloud og.PointCloud PointCloud object.
Returns:
Type Description
og.PointCloud -

setPolyline(polyline){og.Polyline}

Sets entity polyline.
Name Type Description
polyline og.Polyline Polyline object.
Returns:
Type Description
og.Polyline -

setShape(shape){og.Polyline}

Sets entity shape.
Name Type Description
shape og.BaseShape Shape object.
Returns:
Type Description
og.Polyline -

setVisibility(visibility)

Sets the entity visibility.
Name Type Description
visibility boolean Entity visibility.