com.supermap.web.events
public class SnapEvent
继承 SnapEvent Inheritance flash.events.Event

捕捉事件。.

该类用于在启动捕捉功能时提供了捕捉成功和失败两个事件。(SuperMap iServer 7.0及以上版本支持)



公共属性
  属性 定义方
    feature : Feature
[read-only] 获取当前捕捉到的feature对象。
SnapEvent
    nodes : Array
[read-only] 获取多节点捕捉成功时的节点数组。
SnapEvent
    point : Point2D
[read-only] 获取捕捉后返回的点位置,捕捉成功返回捕捉后的点,失败返回鼠标原位置。
SnapEvent
公共方法
  方法 定义方
   
SnapEvent(type:String, point:Point2D, nodes:Array = null, feature:Feature = null)
初始化 SnapEvent 类的新实例。
SnapEvent
公共常量
  常量 定义方
    SNAP_FAILED : String = snapFailed
[static] 离捕捉失败事件。
SnapEvent
    SNAP_SUCCEED : String = snapSucceed
[static] 捕捉成功事件。
SnapEvent
属性详细信息
feature 属性
feature:Feature  [read-only]

获取当前捕捉到的feature对象。


Implementation
    public function get feature():Feature
nodes 属性  
nodes:Array  [read-only]

获取多节点捕捉成功时的节点数组。


Implementation
    public function get nodes():Array
point 属性  
point:Point2D  [read-only]

获取捕捉后返回的点位置,捕捉成功返回捕捉后的点,失败返回鼠标原位置。


Implementation
    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

捕捉成功事件。