Class: DragPan

ol/interaction/DragPan~DragPan


import DragPan from 'ol/interaction/DragPan';

Allows the user to pan the map by dragging the map.

new DragPan(opt_options)

interaction/DragPan.js, line 26
Name Type Description
options

Options.

Name Type Description
condition module:ol/events/condition~Condition

A function that takes an module:ol/MapBrowserEvent~MapBrowserEvent and returns a boolean to indicate whether that event should be handled. Default is module:ol/events/condition~noModifierKeys.

kinetic module:ol/Kinetic~Kinetic

Kinetic inertia to apply to the pan.

Fires:

Extends

Observable Properties

Name Type Settable ol/Object.ObjectEvent type Description
active boolean yes change:active

true if the interaction is active, false otherwise.

Methods

handleEvent() inherited

interaction/Pointer.js, line 120

Handles the map browser event and may call into other functions, if event sequences like e.g. 'drag' or 'down-up' etc. are detected.