new mapboxgl.supermap.MapvLayer(map, dataSet, mapVOptions)
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
map |
mapboxgl.Map |
The mapboxgl map object will be deprecated in the next version. Use the map.addLayer() method to add a layer. |
||||||
dataSet |
Mapv.DataSet |
The layer dataset for MapV. |
||||||
mapVOptions |
Object |
Options of mapV layer
|
Methods
-
addData(data, options)
MapvLayer.js, line 113 -
Append data.
Name Type Description data
Object The data to be appended.
options
Object The value to append.
-
clearData()
MapvLayer.js, line 162 -
Clear data.
-
getData(){mapv.DataSet}
MapvLayer.js, line 134 -
Get Data.
Returns:
Type Description mapv.DataSet Mapv dataset. -
getTopLeft()
MapvLayer.js, line 99 -
Get the distance from the top left.
-
moveTo(layerID, before)
MapvLayer.js, line 72 -
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).
-
removeData(filter)
MapvLayer.js, line 146 -
Remove data that conforms to the filter conditions.
Name Type Description filter
function optional The filters. The parameter to pass in is data item. If returns true,the data is deleted; otherwise the data is not deleted.
Example
filter=function(data){ if(data.id=="1"){ return true } return false; }
-
removeFromMap()
MapvLayer.js, line 47 -
Remove the layer.
-
setVisibility(visibility)
MapvLayer.js, line 56 -
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 resolution).
-
setZIndex(zIndex)
MapvLayer.js, line 202 -
Set the canvas level.
Name Type Description zIndex
number Canvas level.
-
update(opt)
MapvLayer.js, line 123 -
Update the layer.
Name Type Description opt
Object The data to be updated.
Name Type Description data
Object Mapv dataset.
options
Object Mapv draws parameters.