OpenLayers源码解析18 ol/interaction/Draw.js

编程入门 行业动态 更新时间:2024-10-25 18:25:10

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’

更多推荐

OpenLayers源码解析18 ol/interaction/Draw.js

本文发布于:2023-06-11 01:35:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1368536.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:源码   OpenLayers   ol   js   Draw

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!