實(shí)體實(shí)例將多種形式的可視化聚合到單個(gè)高級對象中。它們可以手動(dòng)創(chuàng)建并添加到
new Entity(options)
Viewer#entities
或由數(shù)據(jù)源生成,如CzmlDataSource
和GeoJsonDataSource
。
Parameters:
options
(Object)
Name | Description |
---|---|
options.id
String
|
此對象的唯一標(biāo)識(shí)符。如果沒有提供,將生成一個(gè)guid。 |
options.name
String
|
顯示給用戶的可讀名稱。它不一定是獨(dú)一無二的。 |
options.availability
TimeIntervalCollection
|
與此對象關(guān)聯(lián)的可用性(如果有)。 |
options.show
Boolean
|
指示實(shí)體及其子實(shí)體是否顯示的布爾值。 |
options.description
Property
|
指定此實(shí)體的HTML描述的字符串屬性。 |
options.position
PositionProperty
|
指定實(shí)體位置的屬性。 |
options.orientation
Property
|
指定實(shí)體方向的屬性。 |
options.viewFrom
Property
|
用于查看此對象的建議初始偏移量。 |
options.parent
Entity
|
要與此實(shí)體關(guān)聯(lián)的父實(shí)體。 |
options.billboard
BillboardGraphics
|
要與此實(shí)體關(guān)聯(lián)的公告牌。 |
options.box
BoxGraphics
|
與此實(shí)體關(guān)聯(lián)的框。 |
options.corridor
CorridorGraphics
|
要與此實(shí)體關(guān)聯(lián)的道路。 |
options.cylinder
CylinderGraphics
|
要與此實(shí)體關(guān)聯(lián)的圓柱體。 |
options.ellipse
EllipseGraphics
|
要與此實(shí)體關(guān)聯(lián)的橢圓。 |
options.ellipsoid
EllipsoidGraphics
|
要與此實(shí)體關(guān)聯(lián)的橢球體。 |
options.label
LabelGraphics
|
要與此實(shí)體關(guān)聯(lián)的options.label。 |
options.model
ModelGraphics
|
要與此實(shí)體關(guān)聯(lián)的模型。 |
options.path
PathGraphics
|
與此實(shí)體關(guān)聯(lián)的路徑。 |
options.plane
PlaneGraphics
|
與此實(shí)體關(guān)聯(lián)的平面。 |
options.point
PointGraphics
|
要與此實(shí)體關(guān)聯(lián)的點(diǎn)。 |
options.polygon
PolygonGraphics
|
要與此實(shí)體關(guān)聯(lián)的多邊形。 |
options.polyline
PolylineGraphics
|
要與此實(shí)體關(guān)聯(lián)的多段線。 |
options.properties
PropertyBag
|
要與此實(shí)體關(guān)聯(lián)的任意屬性。 |
options.polylineVolume
PolylineVolumeGraphics
|
要與此實(shí)體關(guān)聯(lián)的多行卷。 |
options.rectangle
RectangleGraphics
|
要與此實(shí)體關(guān)聯(lián)的矩形。 |
options.wall
WallGraphics
|
與此實(shí)體關(guān)聯(lián)的墻。 |
Members
availability : TimeIntervalCollection
與此對象關(guān)聯(lián)的可用性(如果有)。如果未定義可用性,則假定此對象的其他屬性將在任何提供的時(shí)間返回有效數(shù)據(jù)。如果可用性存在,對象其他屬性將僅在給定間隔內(nèi)查詢時(shí)提供有效數(shù)據(jù)。
billboard : BillboardGraphics
獲取或設(shè)置廣告牌。
box : BoxGraphics
獲取或設(shè)置框。
corridor : CorridorGraphics
獲取或設(shè)置走廊。
cylinder : CylinderGraphics
獲取或設(shè)置圓柱體。
(readonly) definitionChanged : Event
獲取每當(dāng)屬性或子屬性更改或修改時(shí)引發(fā)的事件。
description : Property
獲取或設(shè)置說明。
ellipse : EllipseGraphics
獲取或設(shè)置橢圓。
ellipsoid : EllipsoidGraphics
獲取或設(shè)置橢球體。
entityCollection : EntityCollection
獲取或設(shè)置此實(shí)體所屬的實(shí)體集合。
id : String
獲取與此對象關(guān)聯(lián)的唯一ID。
isShowing : Boolean
獲取是否顯示此實(shí)體,同時(shí)考慮到任何祖先實(shí)體的可見性。
label : LabelGraphics
獲取或設(shè)置標(biāo)簽。
model : ModelGraphics
獲取或設(shè)置模型。
name : String
獲取或設(shè)置對象的名稱。該名稱用于最終用戶消費(fèi),不需要是唯一的。
orientation : Property
獲取或設(shè)置方向。
parent : Entity
獲取或設(shè)置父對象。
path : PathGraphics
獲取或設(shè)置路徑。
plane : PlaneGraphics
獲取或設(shè)置平面。
point : PointGraphics
獲取或設(shè)置點(diǎn)圖形。
polygon : PolygonGraphics
獲取或設(shè)置多邊形。
polyline : PolylineGraphics
獲取或設(shè)置多段線。
polylineVolume : PolylineVolumeGraphics
獲取或設(shè)置折線體積。
position : PositionProperty
獲取或設(shè)置位置。
properties : PropertyBag
獲取或設(shè)置與此實(shí)體關(guān)聯(lián)的任意屬性包。
propertyNames : Array
獲取在此實(shí)例上注冊的所有屬性的名稱。
rectangle : RectangleGraphics
獲取或設(shè)置矩形。
show : Boolean
獲取或設(shè)置是否應(yīng)顯示此實(shí)體。當(dāng)設(shè)置為true時(shí),僅當(dāng)父實(shí)體的Show屬性也是true時(shí)才顯示該實(shí)體。
viewFrom : Property
獲取或設(shè)置跟蹤此對象時(shí)建議的初始偏移量。偏移通常在“東北向上”參考幀中定義,但可能是另一個(gè)幀,具體取決于對象的速度。
wall : WallGraphics
獲取或設(shè)置墻。
Methods
(static) supportsMaterialsforEntitiesOnTerrain(scene) → {Boolean}
檢查給定場景是否支持除覆蓋在地形或三維瓦片上的實(shí)體上的顏色之外的其他材質(zhì)。如果不支持此功能,則具有非顏色材質(zhì)但沒有“height”的實(shí)體將呈現(xiàn)為高度為0的實(shí)體。
Parameters:
檢查給定的場景是否支持固定到地形或三維平鋪的多段線。如果不支持此功能,則具有多行圖形的實(shí)體將使用提供高度的頂點(diǎn)以及使用“arctype”參數(shù)而不是固定到地面來渲染。
Parameters:
向此對象添加屬性。添加屬性后,可以用
Entity#definitionChanged
觀察,并用CompositeEntityCollection
組合。
Parameters:
propertyName
(String)
要添加的屬性的名稱。
Throws
-
DeveloperError : “property name”是保留的屬性名。
-
DeveloperError : “propertyname”已經(jīng)是注冊的屬性。
在指定時(shí)間計(jì)算實(shí)體轉(zhuǎn)換的模型矩陣。如果方向或位置未定義,則返回Undefined。
Parameters:
給定時(shí)間后,如果此對象在該時(shí)間內(nèi)應(yīng)該有數(shù)據(jù),則返回true。
Parameters:
將此對象上的每個(gè)未分配屬性分配給所提供源對象上相同屬性的值。
Parameters:
刪除了以前用addproperty添加的屬性。
Parameters:
propertyName
(String)
要?jiǎng)h除的屬性的名稱。
Throws
-
DeveloperError : “property name”是保留的屬性名。
-
DeveloperError : “propertyname”不是已注冊的屬性。