admin管理员组

文章数量:1590160

ol/interaction/Draw.js

父类

ol/interaction/Pointer-PointerInteraction

主要功能

画要素的交互。

参数:Draw({})

参数类型说明
typemodule:ol/geom/GeometryType绘制的几何类型。
sourcemodule:ol/source/Vector-VectorSource绘制要素的目标源。
geometryFunctionmodule:ol/interaction/Draw-GeometryFunction坐标更新时调用的函数。

方法

函数名参数源码返回值类型功能
module:ol/interaction/Draw.createBox()interaction/Draw.js, line 1216{module:ol/interaction/Draw~GeometryFunction}创建一个geometryFunction以创造一个正方形,使用draw interaction和type: ‘Circle’
module:ol/interaction/Draw.createRegularPolygon(opt_sides, opt_angle)sides number 多边形边数,默认为32
angle number
interaction/Draw.js, line 1178{module:ol/interaction/Draw~GeometryFunction}创建一个geometryFunction以创造一个多边形,使用draw interaction和type: ‘Circle’

本文标签: 源码OpenLayersoljsDraw