靜態handleHandles the map browser event if it was a
KeyEvent, and decides the direction to pan to (if an arrow key was
pressed).
Map browser event.
false to stop event propagation.
靜態unListen for a certain type of event.
The event type or array of event types.
The listener function.
可選opt_this: ObjectThe object to use as this in listener.
Unique key for the listener. If called with an array of event types as the first argument, the return will be an array of keys.
Listen once for a certain type of event.
The event type or array of event types.
The listener function.
可選opt_this: ObjectThe object to use as this in listener.
Unique key for the listener. If called with an array of event types as the first argument, the return will be an array of keys.
函數Removes an event listener using the key returned by on() or once().
Note that using the ol.Observable.unByKey static function is to
be preferred.
可選opt_options: KeyboardPanOptionsOptions.
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.
Classdesc
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
keyboardEventTargetin ol.Map.documentnever 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.參數: opt_options
Options.
Api
stable