ol.interaction. ol.interaction.KeyboardPan

new KeyboardPan

Stability: experimental

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.

Parameters:
Name Type Argument Description
options olx.interaction.KeyboardPanOptions <optional>

Options.

Properties
Name Type Description
condition ol.events.ConditionType | undefined

A conditional modifier (i.e. Shift key) that determines if the interaction is active or not, default is no modifiers.

pixelDelta number | undefined

Pixel The amount to pan on each key press. Default is 128 pixels.

Source:
  • keyboardpaninteraction.js, line 33

Extends

  • ol.interaction.Interaction