new Entity(options)
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
optional
Entity options:
|
Members
-
protected_altitudenumber
-
Entity visible terrain altitude.
-
protected_cartesianVec3
-
Entity cartesian position.
-
protected_entityCollectionEntityCollection
-
Entity collection that this entity belongs to.
-
protected_entityCollectionIndexnumber
-
Entity collection array store index.
-
protected_layerlayer.Vector
-
Assigned vector layer pointer.
-
protected_layerIndexnumber
-
Assigned vector layer entity array index.
-
protected_lonlatLonLat
-
Geodetic entity coordiantes.
-
protected_lonlatMercLonLat
-
World Mercator entity coordinates.
-
protected_pickingColorVec3
-
Picking color.
-
protected_visibilityboolean
-
Visibility flag.
-
billboardBillboard
-
Billboard entity.
-
childrenNodesArray.<Entity>
-
Children entities.
-
geometryGeometry
-
Geometry entity(available for vector layer only).
-
geoObjectog.Geometry
-
Geo object entity
-
readonlyid
-
Unic identifier.
-
labelLabel
-
Text label entity.
-
parentEntity
-
Parent entity.
-
pointCloudPointCloud
-
PointCloud entity.
-
polylinePolyline
-
Polyline entity.
-
propertiesObject
-
Entity user defined properties.
-
rayray
-
Ray entity.
-
shapeshape.BaseShape
-
Shape entity.
-
stripStrip
-
Strip entity.
Methods
-
protected_setCartesian3vSilent(cartesian, skipLonLat)
-
Sets entity cartesian position without event dispatching.
Name Type Description cartesian
Vec3 Cartesian position in 3d space. skipLonLat
boolean skip geodetic calculation. -
addTo(collection, rightNow){Entity}
-
Adds current entity into the specified entity collection.
Name Type Default Description collection
EntityCollection | Vector Specified entity collection or vector layer. rightNow
Boolean false optional Entity insertion option for vector layer. Returns:
Type Description Entity - This object. -
appendChild(entity)
-
Append child entity.
Name Type Description entity
Entity Child entity. -
getAltitude(){number}
-
Sets entity altitude over the planet.
Returns:
Type Description number Altitude. -
getCartesian(){Vec3}
-
Returns carteain position.
Returns:
Type Description Vec3 - -
getExtent(){Extent}
-
Return geodethic extent.
Returns:
Type Description Extent - -
getLonLat(){LonLat}
-
Gets entity geodetic coordinates.
Returns:
Type Description LonLat - -
getVisibility(){boolean}
-
Returns entity visibility.
Returns:
Type Description boolean - -
remove()
-
Removes current entity from collection and layer.
-
setAltitude(altitude)
-
Sets entity altitude over the planet.
Name Type Description altitude
number Altitude. -
setBillboard(billboard){Billboard}
-
Sets entity billboard.
Name Type Description billboard
Billboard Billboard object. Returns:
Type Description 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
Vec3 Cartesian position in 3d space. -
setGeometry(geometry){Geometry}
-
Sets entity geometry.
Name Type Description geometry
Geometry Geometry object. Returns:
Type Description Geometry - -
setGeoObject(geoObject){GeoObject}
-
Sets entity geoObject.
Name Type Description geoObject
GeoObject GeoObject. Returns:
Type Description GeoObject - -
setLabel(label){Label}
-
Sets entity label.
Name Type Description label
Label Text label. Returns:
Type Description Label - -
setLonLat(lonlat)
-
Sets geodetic coordinates of the entity point object.
Name Type Description lonlat
LonLat WGS84 coordinates. -
setPickingColor()
-
Appends entity items(billboard, label etc.) picking color.
-
setPointCloud(pointCloud){PointCloud}
-
Sets entity pointCloud.
Name Type Description pointCloud
PointCloud PointCloud object. Returns:
Type Description PointCloud - -
setPolyline(polyline){Polyline}
-
Sets entity polyline.
Name Type Description polyline
Polyline Polyline object. Returns:
Type Description Polyline - -
setRay(ray){Ray}
-
Sets entity ray.
Name Type Description ray
Ray Ray object. Returns:
Type Description Ray - -
setShape(shape){Polyline}
-
Sets entity shape.
Name Type Description shape
BaseShape Shape object. Returns:
Type Description Polyline - -
setStrip(strip){Strip}
-
Sets entity strip.
Name Type Description strip
Strip Strip object. Returns:
Type Description Strip - -
setVisibility(visibility)
-
Sets the entity visibility.
Name Type Description visibility
boolean Entity visibility.