Class: mapVLayer

mapVLayer

MapV图层

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

leaflet/overlay/MapVLayer.js, line 4
Name Type Description
dataSet mapv.DataSet

MapV图层数据集

mapVOptions Object

MapV图层参数

options Object

可选参数。如:
attributionPrefix - {string} 版权信息前缀。
attribution - {string} 版权信息。

Extends

Methods

addData(data, options)

leaflet/overlay/MapVLayer.js, line 77

追加数据

Name Type Description
data Object

要追加的数据

options Object

要追加的值

clearData()

leaflet/overlay/MapVLayer.js, line 126

清除数据

draw()

leaflet/overlay/MapVLayer.js, line 134

绘制图层

getCanvas(){HTMLElement}

leaflet/overlay/MapVLayer.js, line 159

获取canvas

Returns:
Type Description
HTMLElement 返回mapV图层包含的canvas对象

getContainer(){HTMLElement}

leaflet/overlay/MapVLayer.js, line 168

获取容器

Returns:
Type Description
HTMLElement 返回包含mapV图层的dom对象

getData(){mapv.DataSet}

leaflet/overlay/MapVLayer.js, line 98

获取数据

Returns:
Type Description
mapv.DataSet mapv数据集

getTopLeft(){L.Bounds}

leaflet/overlay/MapVLayer.js, line 177

获取左上角坐标

Returns:
Type Description
L.Bounds 返回左上角坐标

removeData(filter)

leaflet/overlay/MapVLayer.js, line 110

删除符合过滤条件的数据

Name Type Description
filter function

过滤条件。条件参数为数据项,返回值为true,表示删除该元素;否则表示不删除

Example
filter=function(data){
   if(data.id=="1"){
     return true
   }
   return false;
 }

render()

leaflet/overlay/MapVLayer.js, line 151

渲染

setZIndex(zIndex)

leaflet/overlay/MapVLayer.js, line 142

设置canvas层级

Name Type Description
zIndex number

canvas层级

update(opt)

leaflet/overlay/MapVLayer.js, line 87

更新图层

Name Type Description
opt Object

待更新的数据
data -{Object} mapv数据集
options -{Object} mapv绘制参数