Class: MapVLayer

MapVLayer

MapV图层。

new SuperMap.Layer.MapVLayer(name, options)

classic/overlay/MapVLayer.js, line 4
Name Type Description
name string

图层名

options Object

可选参数,有如下两个参数:
dataSet - {mapv.DataSet} mapv 的dataSet对象
options - {Object} mapv 绘图风格配置信息

Extends

  • SuperMap.Layer

Members

canvasCanvas

MapV图主绘制面板。

dataSetmapv.DataSet

mapv dataset 对象

optionsObject

mapv 绘图风格配置信息

supportedboolean

当前浏览器是否支持canvas绘制,默认为false。决定了MapV图是否可用,内部判断使用。

Methods

addData(dataSet, options)

classic/overlay/MapVLayer.js, line 102

追加数据

Name Type Description
dataSet mapv.DataSet

mapv数据集

options Object

mapv绘图参数

clearData()

classic/overlay/MapVLayer.js, line 152

清除数据

destroy()

classic/overlay/MapVLayer.js, line 85

getData(){mapv.DataSet}

classic/overlay/MapVLayer.js, line 124

获取数据

Returns:
Type Description
mapv.DataSet mapv数据集

moveTo(bounds, zoomChanged, dragging)

classic/overlay/MapVLayer.js, line 177

重置当前MapV图层的div,再一次与Map控件保持一致。 修改当前显示范围,当平移或者缩放结束后开始重绘MapV图的渲染效果。

Name Type Description
bounds SuperMap.Bounds

图层范围

zoomChanged boolean

缩放级别是否改变

dragging boolean

是否拖动

removeData(filter)

classic/overlay/MapVLayer.js, line 136

删除符合过滤条件的数据

Name Type Description
filter function

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

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

setMap(map)

classic/overlay/MapVLayer.js, line 161

图层已经添加到Map中。 如果当前浏览器支持canvas,则开始渲染要素;如果不支持则移除图层。

Name Type Description
map SuperMap.Map

需要绑定的map对象

transferToMapLatLng(latLng)

classic/overlay/MapVLayer.js, line 218

将经纬度转成底图的投影坐标

Name Type Description
latLng SuperMap.Lonlat

经纬度坐标