Class: PlotDrawControl

PlotDrawControl

鼠标标绘控件类。

new PlotDrawControl(drawingLayer, options)

Usage
//浏览器
<script type="text/javascript" src="../../web/libs/plotting/leaflet/11.2.0/iclient-plot-leaflet-es6.min.js"></script>
<script>
  new L.supermap.plotting.DrawControl(drawingLayer);

  //另一种写法
  L.supermap.plotting.drawControl(drawingLayer);

</script>

//ES6 Import
import { PlotDrawControl } from '../../public/iclient-plot/iclient-plot-leaflet-es6.min.js';

new PlotDrawControl(drawingLayer);
leaflet/control/PlotDrawControl.js, line 6
Name Type Description
drawingLayer PlottingLayer

绘制图层。

options Object

绘制控件的属性。

Name Type Description
isShowPop boolean 可选

是否显示标绘提示框。

Extends

Methods

onAdd(map)

leaflet/control/PlotDrawControl.js, line 55

添加控件。

Name Type Description
map L.Map

地图。

onRemove()

leaflet/control/PlotDrawControl.js, line 80

删除控件。

setDrawingLayer(drawingLayer)

leaflet/control/PlotDrawControl.js, line 92

设置绘制图层。

Name Type Description
drawingLayer PlottingLayer

绘制图层。

setShowPop(isShowPop)

leaflet/control/PlotDrawControl.js, line 118

是否显示标绘提示框。

Name Type Description
isShowPop Boolean

是否显示。