new MapVLayer(dataSet, mapVOptions, options)
Usage
// 浏览器
<script type="text/javascript" src="https://iclient.supermap.io/dist/leaflet/iclient-leaflet.js"></script>
<script>
  new L.supermap.MapVLayer(dataSet, mapVOptions, options);
  
  // 弃用的写法
  L.supermap.mapVLayer(dataSet, mapVOptions, options);
  
</script>
// ES6 Import
import { MapVLayer } from '@supermapgis/iclient-leaflet';
new MapVLayer(dataSet, mapVOptions, options);
        
        
        
            leaflet/overlay/MapVLayer.js, line 9
        
        
    | Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| dataSet | Mapv.DataSet | MapV 图层数据集。 | ||||||||||||
| mapVOptions | Object | MapV 图层参数。 | ||||||||||||
| options | Object | 参数。 
 | 
Fires
Extends
Events
- 
    loadedleaflet/overlay/MapVLayer.js, line 64
- 
    
    图层添加完成之后触发。 
Methods
- 
    addData(data, options)leaflet/overlay/MapVLayer.js, line 89
- 
    
    添加数据。 Name Type Description dataObject 需要添加的数据。 optionsObject 参数。 
- 
    clearData()leaflet/overlay/MapVLayer.js, line 138
- 
    
    清除数据。 
- 
    draw()leaflet/overlay/MapVLayer.js, line 146
- 
    
    绘制图层。 
- 
    getCanvas(){HTMLElement}leaflet/overlay/MapVLayer.js, line 171
- 
    
    获取 canvas。 Returns:Type Description HTMLElement 返回 mapV 图层包含的 canvas 对象。 
- 
    getContainer(){HTMLElement}leaflet/overlay/MapVLayer.js, line 180
- 
    
    获取容器。 Returns:Type Description HTMLElement 返回包含 mapV 图层的 dom 对象。 
- 
    getData(){Mapv.DataSet}leaflet/overlay/MapVLayer.js, line 110
- 
    
    获取数据。 Returns:Type Description Mapv.DataSet mapv 数据集。 
- 
    getTopLeft(){L.Bounds}leaflet/overlay/MapVLayer.js, line 189
- 
    
    获取左上角坐标。 Returns:Type Description L.Bounds 返回左上角坐标。 
- 
    removeData(filter)leaflet/overlay/MapVLayer.js, line 122
- 
    
    删除数据。 Name Type Description filterfunction 过滤条件。指定数据项后,返回值为 true,表示删除该元素;否则表示不删除。 Examplefilter=function(data){ if(data.id=="1"){ return true } return false; }
- 
    render()leaflet/overlay/MapVLayer.js, line 163
- 
    
    渲染。 
- 
    setZIndex(zIndex)leaflet/overlay/MapVLayer.js, line 154
- 
    
    设置 canvas 层级。 Name Type Description zIndexnumber canvas 层级。 
- 
    update(opt, data, options)leaflet/overlay/MapVLayer.js, line 99
- 
    
    更新图层。 Name Type Description optObject 待更新的数据。 dataObject mapv 数据集。 optionsObject 参数。