包 | com.supermap.web.events |
类 | public class DrawEvent |
继承 | DrawEvent ![]() |
该类目前提供了绘图开始、绘图结束两种事件类型。
属性 | 定义方 | ||
---|---|---|---|
endPoint : Point2D
[read-only] 绘制操作的终点坐标。
|
DrawEvent | ||
feature : Feature
[read-only] 设置与当前事件关联的矢量要素 Feature。
|
DrawEvent | ||
startPoint : Point2D
[read-only] 绘制操作的起点坐标。
|
DrawEvent |
方法 | 定义方 | ||
---|---|---|---|
初始化 DrawEvent 类的新实例。
|
DrawEvent |
常量 | 定义方 | ||
---|---|---|---|
DRAW_CANCEL : String = drawCancel
[static] 定义绘制取消事件的 type 属性值,当在绘制过程中切换地图 action 时,当前绘制操作会自动取消,并派发该事件。
|
DrawEvent | ||
DRAW_END : String = drawEnd
[static] 定义绘制结束事件的 type 属性值,当双击结束时触发该事件。
|
DrawEvent | ||
DRAW_START : String = drawStart
[static] 定义绘制开始事件的 type 属性值,当鼠标第一次按下时触发该事件。
|
DrawEvent | ||
DRAW_UPDATE : String = drawUpdate
[static] 定义绘制刷新事件的 type 属性值,对于绘制自由线或自由面操作,当鼠标移动时触发发该事件;对于其它普通的绘制操作,当鼠标按下时触发该事件。
|
DrawEvent |
endPoint | 属性 |
feature | 属性 |
feature:Feature
[read-only]
设置与当前事件关联的矢量要素 Feature。
public function get feature():Feature
startPoint | 属性 |
DrawEvent | () | 构造函数 |
public function DrawEvent(type:String, feature:Feature = null, startPoint:Point2D = null, endPoint:Point2D = null)
初始化 DrawEvent 类的新实例。
参数type:String — 事件类型。 |
|
feature:Feature (default = null ) — 与当前事件关联的矢量要素 Feature。 |
|
startPoint:Point2D (default = null ) |
|
endPoint:Point2D (default = null ) |
DRAW_CANCEL | 常量 |
public static const DRAW_CANCEL:String = drawCancel
定义绘制取消事件的 type 属性值,当在绘制过程中切换地图 action 时,当前绘制操作会自动取消,并派发该事件。
DRAW_END | 常量 |
public static const DRAW_END:String = drawEnd
定义绘制结束事件的 type 属性值,当双击结束时触发该事件。
DRAW_START | 常量 |
public static const DRAW_START:String = drawStart
定义绘制开始事件的 type 属性值,当鼠标第一次按下时触发该事件。
DRAW_UPDATE | 常量 |
public static const DRAW_UPDATE:String = drawUpdate
定义绘制刷新事件的 type 属性值,对于绘制自由线或自由面操作,当鼠标移动时触发发该事件;对于其它普通的绘制操作,当鼠标按下时触发该事件。