PlottingLayer

new SuperMap3D.PlottingLayer(scene, layerName)

Plotting Layer Class
Name Type Description
scene Scene Scene
layerName String Name of plotting layer

Members

geoGraphicObjects : Array.<GeoGraphicObject>

Array of plotting objects for layers

id : Number

ID of Layer

isEditable : Boolean

Is the layer editable?

isLocked : Boolean

Is the layer locked?

isSelected : Boolean

Is the layer selectable?

name : String

The name of the layer

readonlyselectedFeature : GeoGraphicObject

The currently selected object

symbolAddedEvent : Event

symbol added event

visibility : Boolean

Visibility of the layer

Methods

addFeature(geoGraphicObject)Boolean

Add symbols to the plotting layer
Name Type Description
geoGraphicObject GeoGraphicObject plotting object to add
Returns:
Whether the addition was successful

createGroupFeaturesByGeoJson(geoJSON)Array.<GroupObject>

Create composite objects based on GeoJson
Name Type Description
geoJSON GeoJson The GeoJson object
Returns:
Array of composite objects.

createGroupObject(features)GroupObject

Create a composite object.
Name Type Description
features Array.<GeoGraphicObject> Plotting object.
Returns:
composite objects

createModelAndPicture(options, callback)

Create plotting objects based on model and image resource paths
Name Type Description
options Object Configuration item
Name Type Description
libID Number Symbol library encoding
code Number symbol encoding
points Array.<MPoint3D> Array of position points for symbol
url String Model or image resource path
modelScale Number model scale value
callback function optional Callback function

createSymbol(libID, code, points, options, callback)

Create symbols based on symbol library encoding and symbol encoding
Name Type Description
libID Number symbol library encoding
code Number symbol encoding
points Array.<MPoint3D> Array of position points for symbol
options Object Configuration items (extended properties for creating models and image elements)
Name Type Description
lineColor Color Line color
lineWidth Number Line width
modelScale Number Model scale
pictureSize Cartesian2 Image size
textContent String annotation content
fontSize String annotation size
fontColor String annotation color
url String Resource path for the model or image
callback function optional callback function.

destroy(isRaiseEvent)

release resources and destroy layers
Name Type Description
isRaiseEvent Boolean Whether to trigger a plotting removal event

geoJsonToGeoGraphicObject(geoJSON, callback)

Convert geoJson to a plotting object and add it to the current plotting layer
Name Type Description
geoJSON JSON GeoJson formatted data
callback function optional callback function.

getBounds()

Get the bounds of the plotting layer
Returns:
layer bounds

getFeatureByUuid(id)GeoGraphicObject

Identify the plotting object based on its ID
Name Type Description
id String id of plotting object
Returns:
plotting object

releaseSelection()

Release the selected object

removeAll(isRaiseEvent)

Clear the layer
Name Type Description
isRaiseEvent Boolean Whether the plotting removal event is triggered

removeFeatureByUuId(uuid, isRaiseEvent)

Remove the specified plot symbol from the layer based on UUID
Name Type Description
uuid String The ID of the plot symbol to be removed
isRaiseEvent Boolean Whether to send a plotting removal event

removeGeoGraphicObject(geoGraphicObject, isRaiseEvent)

Remove the specified symbol
Name Type Description
geoGraphicObject GeoGraphicObject plotting object to be removed
isRaiseEvent Boolean Whether to send a plotting removal event

setSelectedFeature(geoGraphicObject)

Set the selected symbol
Name Type Description
geoGraphicObject GeoGraphicObject

setSelectedFeatureByID(id)

Set the selected symbol based on the ID
Name Type Description
id String ID of plotting object

setSelectedFeatureByIndex(index)

Set the selected symbol based on the index
Name Type Description
index Number index in the layer

setUseDepthTest(Whether depth detection is supported)

Set whether the layer supports depth detection
Name Type Description
Whether depth detection is supported Boolean

unGroupObject(features)Boolean

Split composite object
Name Type Description
features Array.<GeoGraphicObject> Composite object
Returns:
Whether the splitting was successful.

updateGeoGraphicObjectByGeoJson(geoJson)

Modify a plotting object via GeoJson
Name Type Description
geoJson Object
Returns:
plotting object