EventHelper

new SuperMap3D.EventHelper()

用于简化事件驱动编程的工具组件。
Example:
var helper = new SuperMap3D.EventHelper();

helper.add(someObject.event, listener1, this);
helper.add(otherObject.event, listener2, this);

// later...
helper.removeAll();
See:

Methods

add(event, listener, scope)EventHelper~RemoveCallback

为事件添加监听器,并记录注册信息以便稍后清理。
Name Type Description
event Event 要附加的事件。
listener function 事件发生时要执行的函数。
scope Object optional 作为 this 对象范围的可选对象。指针,监听器函数将在其中执行。
Returns:
调用后将移除此事件监听器的函数。
See:

removeAll()

取消注册之前添加的所有监听器。
See:

Type Definitions

RemoveCallback()

移除监听器的函数。