包 | com.supermap.web.events |
类 | public class SnapEvent |
继承 | SnapEvent ![]() |
该类用于在启动捕捉功能时提供了捕捉成功和失败两个事件。(SuperMap iServer 7.0及以上版本支持)
属性 | 定义方 | ||
---|---|---|---|
feature : Feature
[read-only] 获取当前捕捉到的feature对象。
|
SnapEvent | ||
nodes : Array
[read-only] 获取多节点捕捉成功时的节点数组。
|
SnapEvent | ||
point : Point2D
[read-only] 获取捕捉后返回的点位置,捕捉成功返回捕捉后的点,失败返回鼠标原位置。
|
SnapEvent |
方法 | 定义方 | ||
---|---|---|---|
初始化 SnapEvent 类的新实例。
|
SnapEvent |
常量 | 定义方 | ||
---|---|---|---|
SNAP_FAILED : String = snapFailed
[static] 离捕捉失败事件。
|
SnapEvent | ||
SNAP_SUCCEED : String = snapSucceed
[static] 捕捉成功事件。
|
SnapEvent |
feature | 属性 |
nodes | 属性 |
nodes:Array
[read-only]
获取多节点捕捉成功时的节点数组。
public function get nodes():Array
point | 属性 |
point:Point2D
[read-only]
获取捕捉后返回的点位置,捕捉成功返回捕捉后的点,失败返回鼠标原位置。
public function get point():Point2D
SnapEvent | () | 构造函数 |
public function SnapEvent(type:String, point:Point2D, nodes:Array = null, feature:Feature = null)
初始化 SnapEvent 类的新实例。
参数type:String — 事件类型。 |
|
point:Point2D — 与该事件关联的点对象。 |
|
nodes:Array (default = null ) |
|
feature:Feature (default = null ) |
SNAP_FAILED | 常量 |
public static const SNAP_FAILED:String = snapFailed
离捕捉失败事件。
SNAP_SUCCEED | 常量 |
public static const SNAP_SUCCEED:String = snapSucceed
捕捉成功事件。