Class: Entity

og.Entity

new og.Entity(options, properties)

Entity instances aggregate multiple forms of visualization into a single high-level object. They can be created manually and added to entity collection.
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.math.Vector3 | 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 Object optional Entity custom properties.

Members

protected_altitudenumber

Entity visible terrain altitude.

protected_cartesianog.math.Vector3

Entity cartesian position.

protected_entityCollectionog.EntityCollection

Entity collection that this entity belongs to.

protected_entityCollectionIndexnumber

Entity collection array store index.

protected_lonlatog.LonLat

Geodetic entity coordiantes.

protected_lonlatMercog.LonLat

World Mercator entity coordinates.

protected_pickingColorog.math.Vector3

Picking color.

protected_vectorLayerog.layer.Vector

Assigned vector layer pointer.

protected_vectorLayerIndexnumber

Assigned vector layer entity array index.

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.
Shape entity.

Methods

protected_setCartesian3vSilent(position)

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

addTo(collection, rightNow)

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.

appendChild(entity)

Append child entity.
Name Type Description
entity og.Entity Child entity.
Returns carteain position.
Returns:
Type Description
og.math.Vector3
Return geodethic extent.
Returns:
Type Description
og.Extent
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)

Sets entity billboard.
Name Type Description
billboard og.Billboard Billboard image.

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(position)

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

setGeometry(geometry)

Sets entity geometry.
Name Type Description
geometry og.Geometry Geometry object.

setLabel(label)

Sets entity label.
Name Type Description
label og.Label Text 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)

Sets entity pointCloud.
Name Type Description
pointCLoud og.PointCloud PointCloud object.

setPolyline(polyline)

Sets entity polyline.
Name Type Description
polyline og.Polyline Polyline object.

setShape(shape)

Sets entity shape.
Name Type Description
shape og.BaseShape Shape object.

setVisibility(visibilty)

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