| 包 | com.supermap.web.events |
| 类 | public class GraphicsLayerEvent |
| 继承 | GraphicsLayerEvent flash.events.Event |
该类目前提供了三种与 GraphicsLayer 相关的事件类型:添加、删除部分、删除所有 Graphic 三种事件类型。
| 属性 | 定义方 | ||
|---|---|---|---|
| errorGraphics : Array
操作执行失败的 Graphic 数组,如在添加 Graphic 数组时,部分未添加成功的 Graphic,则会通过事件被派发给用户。该参数为空,表示全部添加成功。
|
GraphicsLayerEvent | ||
| message : String
[read-only] 事件信息。
|
GraphicsLayerEvent | ||
| 方法 | 定义方 | ||
|---|---|---|---|
|
GraphicsLayerEvent(type:String, errorGraphics:Array = null, message:String = null)
初始化 GraphicsLayerEvent 类的新实例。
|
GraphicsLayerEvent | ||
| 常量 | 定义方 | ||
|---|---|---|---|
| GRAPHICS_ADD : String = graphicsAdd
[static] 添加 Graphic 数组事件类型,当调用 GraphicsLayer.add() 添加 Graphic 后触发。
|
GraphicsLayerEvent | ||
| GRAPHICS_REMOVE : String = graphicsRemove
[static] 删除 Graphic 数组事件类型,当调用 GraphicsLayer.remove() 删除 Graphic 后触发。
|
GraphicsLayerEvent | ||
| GRAPHICS_REMOVE_ALL : String = graphicsRemoveAll
[static] 当调用 GraphicsLayer.removeAll() 清空 GraphicsLayer 后触发。
|
GraphicsLayerEvent | ||
| errorGraphics | 属性 |
errorGraphics:Array
操作执行失败的 Graphic 数组,如在添加 Graphic 数组时,部分未添加成功的 Graphic,则会通过事件被派发给用户。该参数为空,表示全部添加成功。
public function get errorGraphics():Array public function set errorGraphics(value:Array):void| message | 属性 |
message:String [read-only]
事件信息。
public function get message():String| GraphicsLayerEvent | () | 构造函数 |
public function GraphicsLayerEvent(type:String, errorGraphics:Array = null, message:String = null)
初始化 GraphicsLayerEvent 类的新实例。
参数type:String — 事件类型。必设参数。 |
|
errorGraphics:Array (default = null) — 操作执行失败的 Graphic 数组,如在添加 Graphic 数组时,部分未添加成功的 Graphic,则会通过事件被派发给用户。该参数为空,表示全部添加成功。 |
|
message:String (default = null) — 事件信息。 |
| GRAPHICS_ADD | 常量 |
public static const GRAPHICS_ADD:String = graphicsAdd
添加 Graphic 数组事件类型,当调用 GraphicsLayer.add() 添加 Graphic 后触发。
| GRAPHICS_REMOVE | 常量 |
public static const GRAPHICS_REMOVE:String = graphicsRemove
删除 Graphic 数组事件类型,当调用 GraphicsLayer.remove() 删除 Graphic 后触发。
| GRAPHICS_REMOVE_ALL | 常量 |
public static const GRAPHICS_REMOVE_ALL:String = graphicsRemoveAll
当调用 GraphicsLayer.removeAll() 清空 GraphicsLayer 后触发。