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

地图控件 Map 事件类

另请参见

com.supermap.web.mapping.Map


公共属性
  属性 定义方
    index : int
[read-only] 获取 Map 中新加入的或被重新移动位置的图层在 Map 中的位置。
MapEvent
    layer : Layer
[read-only] 获取 Map 中新加入的或被重新移动位置的图层。
MapEvent
    map : Map
[read-only] 获取与当前事件关联的 Map 。
MapEvent
公共方法
  方法 定义方
   
MapEvent(type:String, map:Map = null, layer:Layer = null, index:int = -1)
初始化 MapEvent 类的新实例。
MapEvent
公共常量
  常量 定义方
    LAYER_ADD : String = layerAdd
[static] 定义 layerAdd 事件的 type 属性值。
MapEvent
    LAYER_MOVE : String = layerMove
[static] 定义 layerReorder 事件的 type 属性值。
MapEvent
    LAYER_REMOVE : String = layerRemove
[static] 定义 layerRemove 事件的 type 属性值。
MapEvent
    LAYER_REMOVE_ALL : String = layerRemoveAll
[static] 定义 layerRemoveAll 事件的 type 属性值。
MapEvent
    LOAD : String = load
[static] 定义 load 事件的 type 属性值。
MapEvent
属性详细信息
index 属性
index:int  [read-only]

获取 Map 中新加入的或被重新移动位置的图层在 Map 中的位置。


Implementation
    public function get index():int
layer 属性  
layer:Layer  [read-only]

获取 Map 中新加入的或被重新移动位置的图层。


Implementation
    public function get layer():Layer
map 属性  
map:Map  [read-only]

获取与当前事件关联的 Map 。


Implementation
    public function get map():Map
构造函数详细信息
MapEvent () 构造函数
public function MapEvent(type:String, map:Map = null, layer:Layer = null, index:int = -1)

初始化 MapEvent 类的新实例。

参数
type:String — 事件类型。必设参数。
 
map:Map (default = null) — 与事件关联的 Map。
 
layer:Layer (default = null) — Map 中新加入的或被重新移动位置的图层。当定义 MapEvent.LAYER_ADD 或 MapEvent.LAYER_REORDER 事件时需要设置此参数。
 
index:int (default = -1) — Map 中新加入的或被重新移动位置的图层在 Map 中的位置。当定义 MapEvent.LAYER_ADD 或 MapEvent.LAYER_REORDER 事件时需要设置此参数。
常量描述
LAYER_ADD 常量
public static const LAYER_ADD:String = layerAdd

定义 layerAdd 事件的 type 属性值。

LAYER_MOVE 常量  
public static const LAYER_MOVE:String = layerMove

定义 layerReorder 事件的 type 属性值。

LAYER_REMOVE 常量  
public static const LAYER_REMOVE:String = layerRemove

定义 layerRemove 事件的 type 属性值。

LAYER_REMOVE_ALL 常量  
public static const LAYER_REMOVE_ALL:String = layerRemoveAll

定义 layerRemoveAll 事件的 type 属性值。

LOAD 常量  
public static const LOAD:String = load

定义 load 事件的 type 属性值。