new mapboxgl.supermap.DeckglLayer(layerTypeID, options)
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
layerTypeID |
string |
High efficiency layer type ID,Includes "scatter-plot" high-efficiency point layer, "path-layer" path layer (line layer), "polygon-layer" high-efficiency surface layer, "arc-layer" curve layer, "hexagon-layer" "Positive hexagonal layer (honeycomb layer), "screen-grid-layer" grid layer. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
options |
Object |
Layer configuration item, including the following parameters:
|
Members
-
graphicsArray.<mapboxgl.supermap.Graphic>
-
An array of point feature objects.
-
idstring
-
The id of the high efficiency point layer.
-
visibilityboolean
-
The layer shows the properties of the state.
- Default Value: true
Methods
-
addData(data)
DeckglLayer.js, line 239 -
Add a point feature that will not overwrite the previous feature.
Name Type Description data
Array.<Object> An array of point feature objects.
-
clear()
DeckglLayer.js, line 283 -
Release layer resources.
-
moveTo(layerID, before)
DeckglLayer.js, line 158 -
Move the layer before a layer.
Name Type Default Description layerID
string The layer ID to be inserted.
before
boolean true optional Whether to insert this layer before the layer whose layer id is layerID (if it is false, insert this layer after the layer whose layer id is layerID).
-
onAdd(map){mapboxgl.supermap.DeckglLayer}
DeckglLayer.js, line 105 -
Name Type Description map
mapboxgl.Map The object of the Mapbox GL map.
Returns:
Type Description mapboxgl.supermap.DeckglLayer -
remove()
DeckglLayer.js, line 138 -
Delete the layer.
-
removeData()
DeckglLayer.js, line 293 -
Remove all features.
-
removeFromMap()
DeckglLayer.js, line 148 -
Delete the layer.
- Deprecated
- Yes
-
setData(data)
DeckglLayer.js, line 217 -
Setting the plotted point feature data will overwrite all previous features.
Name Type Description data
Array.<Object> An array of point feature objects.
-
setStyle(styleOptions)
DeckglLayer.js, line 198 -
Set the overall style of the layer.
Name Type Description styleOptions
Object The style of the object.
Name Type Default Description color
Array.<number> [0, 0, 0, 255] optional The color of the point.
radius
number 10 optional The radius of the point.
opacity
number 0.8 optional Opacity.
highlightColor
Array optional Highlight color, currently only supports rgba arrays.
radiusScale
number 1 optional The multiple of the point magnification.
radiusMinPixels
number 0 optional The minimum radius (pixels).
radiusMaxPixels
number Number.MAX_SAFE_INTEGER optional The maximum radius (pixels).。
strokeWidth
number 12 optional The size of the border.
outline
boolean false optional Whether to display the border.
-
setVisibility(visibility)
DeckglLayer.js, line 184 -
Set layer visibility, set the layer's hidden, display, and redraw corresponding visible markers.
Name Type Description visibility
boolean optional Whether to display the layer (the resolution of the current map is between the maximum and minimum resolutions).
-
update()
DeckglLayer.js, line 257 -
Update the layer.