Layers

new SuperMap3D.Layers()

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

Members

readonlylayerQueue : Array

Get a list of layers.

Methods

add(layer)

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

find(name)Layer

Find layer objects by layer name.
Name Type Description
name String The specified layer name.
Returns:
layer object.

findByIndex(index)Layer

Find the layer object according to the specified index.
Name Type Description
index Number The specified layer index.
Returns:
layer object.

getSelectedLayer()S3MTilesLayer

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

lower(layer)

Adjust the layer order down, corresponding to the imagery layer collection.
Name Type Description
layer Layers layer to be adjusted

lowerToBottom(layer)

Set the current S3M vector surface layer to the bottom layer.
Name Type Description
layer S3MTilesLayer The currently clicked selected S3M layer.

pickFeatures(winpos, scene)

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

raise(layer)

Adjust the layer order upwards, corresponding to the imagery layer collection.
Name Type Description
layer Layers layer to be adjusted

raiseToTop(layer)

Set the current S3M vector surface layer to the top layer.
Name Type Description
layer S3MTilesLayer The currently clicked selected S3M layer.

releaseSelection()

Release the selected layer objects.

remove(layer, destroy)Boolean

Removes the layer object with the specified name from the layers 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 deletion is successful, otherwise returns false.

removeAll(destroy)

Deletes 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 clicked selected S3M layer.
Name Type Description
layer S3MTilesLayer The currently clicked selected S3M layer.