Class: mapVLayer

L.supermap.mapVLayer

The MapV layer calss.

L.supermap.mapVLayer(dataSet, mapVOptions, options)

MapVLayer.js, line 6
Name Type Description
dataSet mapv.DataSet

Dataset of MapV layer.

mapVOptions Object

ptions of mapV layer.

options Object

The optional parameters.

Name Type Default Description
attributionPrefix string optional

The prefix of copyright information.

attribution string '© 2017 百度 MapV' optional

The copyright information.

Fires

Extends

Events

loaded

MapVLayer.js, line 55

Fires when the layer is added.

Methods

addData(data, options)

MapVLayer.js, line 80

Add data to the layer

Name Type Description
data Object

Data needs to add.

options Object

Other options needs to add.

clearData()

MapVLayer.js, line 129

Clear data.

draw()

MapVLayer.js, line 137

Draw the layer.

getCanvas(){HTMLElement}

MapVLayer.js, line 162

Get canvas.

Returns:
Type Description
HTMLElement Return the canvas object contained in the mapV layer.

getContainer(){HTMLElement}

MapVLayer.js, line 171

Get the container.

Returns:
Type Description
HTMLElement Returns a dom object containing a mapV layer.

getData(){mapv.DataSet}

MapVLayer.js, line 101

Get data.

Returns:
Type Description
mapv.DataSet Dataset of mapV layer.

getTopLeft(){L.Bounds}

MapVLayer.js, line 180

Get the container.

Returns:
Type Description
L.Bounds Return the DOM object that contains the mapV layer.

removeData(filter)

MapVLayer.js, line 113

Remove data that conforms to the filter conditions.

Name Type Description
filter function

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;
 }

render()

MapVLayer.js, line 154

Render the layer.

setZIndex(zIndex)

MapVLayer.js, line 145

Set the index of canvas.

Name Type Description
zIndex number

The index of canvas.

update(opt, data, options)

MapVLayer.js, line 90

Update the layer.

Name Type Description
opt Object

Data to update.

data Object

Dataset of mapV layer.

options Object

Drawing parameters of mapV.