Layers

new Cesium.Layers()

Layer collection class. This class is used to manage all the layers in the scene.

Members

readonlylayerQueue : Array

Get a list of layers.

Methods

add(layer)

Add a layer to the layer collection.
Name Type Description
layer Layer The layer to be added.

find(name)Layer

Find layer objects based on the layer name.
Name Type Description
name String The specified layer name.
Returns:
Layer object.

findByIndex(index)Layer

Finds a layer object based on the specified index.
Name Type Description
index Number The specified layer index.
Returns:
Layer object.

getSelectedLayer()S3MTilesLayer

Get the currently selected S3M layer.
Returns:
Returns the S3MTilesLayer layer object.

pickFeatures(winpos, scene)

Query feature element information.
Name Type Description
winpos Number location information.
scene Object Scene object.

releaseSelection()

Release the selected layer object.

remove(layer, destroy)Boolean

Removes the layer object of the specified name from the layer collection.
Name Type Default Description
layer string The name of the layer to be deleted.
destroy Boolean true optional Specifies whether to release resources when deleting.
Returns:
Returns true if the deletion succeeds, otherwise returns false.

removeAll(destroy)

Delete all layer objects in the layer collection.
Name Type Default Description
destroy Boolean true optional Specifies whether to release resources when deleting.

setSelectedLayer(layer)

Set the currently selected S3M layer.
Name Type Description
layer S3MTilesLayer Click on the selected S3M layer currently.