Class: KeyboardZoom

ol/interaction/KeyboardZoom~KeyboardZoom


import KeyboardZoom from 'ol/interaction/KeyboardZoom';

Allows the user to zoom the map using keyboard + and -. 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 module:ol/Map~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 moudle:ol/interaction/KeyboardPan~KeyboardPan.