直接跳到内容
本页目录

Geoman Draw Control

GeomanDrawControl allows one to draw various shapes on the map. The drawing functionality on the front-end is provided by geoman.

The following shapes are supported: - marker - circlemarker - circle - polyline - rectangle - polygon - text

Additionally, there are modes that allow editing of previously drawn shapes:

  • edit
  • drag
  • remove
  • cut
  • rotate

To have a drawing tool active on the map, pass it a non-empty dictionary with the desired options, see geoman documentation for details.

基础用法

API

属性

属性名说明类型默认值
position控件位置enum 'topleft'
draw绘制选项object {}
edit编辑选项object {}

Events

事件名说明类型
draw绘制完成时触发(layer: any) => void

Slots

插槽名说明

方法

方法名说明类型
clear_text()清除所有文字

src/examples/vleaflet/controls/GeomanDraw

Geoman Draw Control已经加载完毕