InstanceLayer

new Cesium.InstanceLayer(context)

Instantiate a layer class.
Name Type Description
context Context Context object

Members

filterDistance : Number

Set or get the sub-object filter distance threshold.

filterMode : Number

Set or get the sub-object filtering mode. The default is: pixel filtering.

filterPixel : Number

Set or get the sub-object filter pixel threshold.

maxVisibleAltitude : Number

Set or get the maximum visible height of the layer.

minVisibleAltitude : Number

Set or get the minimum visible height of the layer.

pickEnable : Color

Set whether the object is optional.

selectedColor : Color

Set or get the highlighted color selected by the object.

tileWidth : Number

Set the length of the slice side.

Methods

add(url, attrs)

Add instances in bulk.
Name Type Description
url String Instance model skeleton url
attrs Array Instance attribute

getInstance(url, ids)

Get an instance.
Name Type Description
url String Instance url
ids Array Instance ids array

getVisibleInViewport(index)Boolean

Get the visibility of the layer corresponding to the viewport.
Name Type Description
index Viewport index
Returns:
Is it visible?

removeInstance(url, ids)

Batch removal of instances
Name Type Description
url String Instance url
ids Array Instance ids array

setUnSelected()

Cancel the selected state of all instances.

setVisibleInViewport(index, visible)

Set the visibility of the layer corresponding to the viewport.
Name Type Description
index Number Viewport index
visible Boolean Is it visible?

update(frameState)

Name Type Description
frameState

updateTiles()

Update all slices of the layer