InstanceLayer

new SuperMap3D.InstanceLayer(context)

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

Members

filterDistance : Number

Set or get the sub-object filtering distance threshold.

filterMode : Number

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

filterPixel : Number

Set or get 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 : Boolean

Get or set whether the object is selectable.
Default Value: true

selectedColor : Color

Set or get the highlight color of the selected object.

shadowType : ShadowType

Get or set the shadow mode. The default value is NONE.
Default Value: NONE

tileWidth : Number

Sets the slice side length.

Methods

add(url, attrs)

Add instances in batches.
Name Type Description
url String instance model skeleton url
attrs Array instance attribute

getInstance(url, ids)

get instance
Name Type Description
url String instance url
ids Array instance ids array

getVisibleInViewport(index)Boolean

Gets the visibility of the corresponding viewport of the layer.
Name Type Description
index Number Viewport index.
Returns:
is visible.

removeInstance(url, ids)

Remove instances in bulk
Name Type Description
url String instance url
ids Array instance ids array

setUnSelected()

Deselects all instances.

setVisibleInViewport(index, visible)

Sets the visibility of the layer corresponding to the viewport.
Name Type Description
index Number viewport index
visible Boolean is visible

update(frameState)

Update instanced frame state
Name Type Description
frameState FrameState optional frame state

updateTiles()

Update all slices of the layer