new Layers()
Layer collection class. This class is used to manage all layers in the scene.
Members
-
readonly layerQueueArray
-
Get a list of layers.
Methods
-
add(layer)
-
Add a layer to the layer collection.
Name Type Description layerS3MTilesLayer The layer to be added.
-
find(name){S3MTilesLayer}
-
Search for S3MTilesLayer layer objects based on layer names
Name Type Description nameString The specified layer name.
Returns:
Type Description S3MTilesLayer Layer object. -
findByIndex(index){S3MTilesLayer}
-
Search for layer objects based on the specified index.
Name Type Description indexNumber The specified layer index.
Returns:
Type Description S3MTilesLayer Layer Object -
forEach(callback)
-
Traverse all S3M layers and execute callback functions
Name Type Description callbackcallback
-
getSelectedLayer(){S3MTilesLayer}
-
Retrieve the S3M layer currently selected by clicking.
Returns:
Type Description S3MTilesLayer Return the S3MTilesLayer layer object. -
lower(layer)
-
Adjust the layer order downwards to correspond to the set of image layers.
Name Type Description layerS3MTilesLayer Layers to be adjusted
-
lowerToBottom(layer)
-
Set the current S3M vector surface layer to the bottom layer.
Name Type Description layerS3MTilesLayer Currently click on the selected S3M layer.
-
pickFeatures(winpos, scene){Promise}
-
Query feature element information.
Name Type Description winposCartesian2 Window coordinates
sceneScene Scene objects
Returns:
Type Description Promise Attribute query asynchronous request promise object -
raise(layer)
-
Adjust the layer order upwards to correspond to the set of image layers.
Name Type Description layerS3MTilesLayer Layers to be adjusted
-
raiseToTop(layer)
-
Set the current S3M vector surface layer to the top level.
Name Type Description layerS3MTilesLayer Currently click on the selected S3M layer.
-
releaseSelection()
-
Release the selected layer object.
-
remove(name, destroy){Boolean}
-
Delete layer objects with specified names from the layer collection.
Name Type Default Description nameString The name of the layer to be deleted.
destroyBoolean true optional Specify whether to release resources when deleting, default to true.
Returns:
Type Description Boolean Return true for successful deletion, otherwise return false. -
removeAll(destroy)
-
Delete all layer objects in the layer collection.
Name Type Default Description destroyBoolean true optional Specify whether to release resources when deleting, default to true.
-
setSelectedLayer(layer)
-
Set the currently selected S3M layer.
Name Type Description layerS3MTilesLayer Currently click on the selected S3M layer.