new Observable
An event target providing convenient methods for listener registration
and unregistration. A generic change event is always available through
ol.Observable#dispatchChangeEvent.
- Source:
- observable.js, line 19
Extends
- goog.events.EventTarget
Methods
-
dispatchChangeEvent
Stability: experimental -
Dispatches a
changeevent. Register a listener for this event to get notified of changes.- Source:
- observable.js, line 39
Fires:
- event:change
-
on
Stability: experimental -
Listen for a certain type of event.
Parameters:
Name Type Argument Description typestring | Array.<string> The event type or array of event types.
listenerfunction The listener function.
thisObject <optional>
The object to use as
thisinlistener.- Source:
- observable.js, line 61
Returns:
Unique key for the listener.
- Type
- goog.events.Key
-
once
Stability: experimental -
Listen once for a certain type of event.
Parameters:
Name Type Argument Description typestring | Array.<string> The event type or array of event types.
listenerfunction The listener function.
thisObject <optional>
The object to use as
thisinlistener.- Source:
- observable.js, line 74
Returns:
Unique key for the listener.
- Type
- goog.events.Key
-
un
Stability: experimental -
Unlisten for a certain type of event.
Parameters:
Name Type Argument Description typestring | Array.<string> The event type or array of event types.
listenerfunction The listener function.
thisObject <optional>
The object to use as
thisinlistener.- Source:
- observable.js, line 86
-
unByKey
Stability: experimental -
Removes an event listener using the key returned by
on()oronce().Parameters:
Name Type Description keygoog.events.Key Key.
- Source:
- observable.js, line 96
OpenLayers 3