experimental new ol.interaction.KeyboardPan(opt_options)
Allows the user to pan the map using keyboard arrows.
Note that, although this interaction is by default included in maps,
the keys can only be used when browser focus is on the element to which
the keyboard events are attached. By default, this is the map div,
though you can change this with the keyboardEventTarget in
ol.Map. document never loses focus but, for any other element,
focus will have to be on, and returned to, this element if the keys are to
function.
See also ol.interaction.KeyboardZoom.
| Name | Type | Argument | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
optional
Options.
|
|||||||||||
Fires:
-
change
Extends
Methods
-
experimental inherited dispatchChangeEvent()
-
Dispatches a
changeevent. Register a listener for this event to get notified of changes.Fires:
-
change
-
-
experimental inherited on(type, listener, opt_this){goog.events.Key}
-
Listen for a certain type of event.
Name Type Argument Description typestring | Array.<string> The event type or array of event types.
listenerfunction The listener function.
thisObject <optional>
optional The object to use as
thisinlistener.Returns:
key for the listener.
-
experimental inherited once(type, listener, opt_this){goog.events.Key}
-
Listen once for a certain type of event.
Name Type Argument Description typestring | Array.<string> The event type or array of event types.
listenerfunction The listener function.
thisObject <optional>
optional The object to use as
thisinlistener.Returns:
key for the listener.
-
experimental inherited un(type, listener, opt_this)
-
Unlisten for a certain type of event.
Name Type Argument Description typestring | Array.<string> The event type or array of event types.
listenerfunction The listener function.
thisObject <optional>
optional The object to use as
thisinlistener. -
experimental inherited unByKey(key)
-
Removes an event listener using the key returned by
on()oronce().Name Type Description keygoog.events.Key Key.
OpenLayers 3