ol. ol.interaction

Source:
  • interaction.jsdoc, line 1

Classes

ol.interaction.DoubleClickZoom
ol.interaction.DragAndDrop
ol.interaction.DragAndDropEvent
ol.interaction.DragBox
ol.interaction.DragPan
ol.interaction.DragRotate
ol.interaction.DragRotateAndZoom
ol.interaction.DragZoom
ol.interaction.Draw
ol.interaction.KeyboardPan
ol.interaction.KeyboardZoom
ol.interaction.Modify
ol.interaction.MouseWheelZoom
ol.interaction.PinchRotate
ol.interaction.PinchZoom
ol.interaction.Select

Methods

<static> defaults

Stability: experimental

This method is a convenience method to create a set of interactions to be used with an ol.Map. Specific interactions can be excluded by setting the appropriate option to false in the constructor options, but the order of the interactions is fixed. If you want to specify a different order for interactions, you will need to create your own ol.interaction instances and insert them into an ol.Collection in the order you want before creating your ol.Map instance.

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

Defaults options.

Properties
Name Type Description
altShiftDragRotate boolean | undefined

Whether Alt-Shift-drag rotate is desired. Default is true.

doubleClickZoom boolean | undefined

Whether double click zoom is desired. Default is true.

keyboard boolean | undefined

Whether keyboard interaction is desired. Default is true.

mouseWheelZoom boolean | undefined

Whether mousewheel zoom is desired. Default is true.

shiftDragZoom boolean | undefined

Whether Shift-drag zoom is desired. Default is true.

dragPan boolean | undefined

Whether drag pan is desired. Default is true.

pinchRotate boolean | undefined

Whether pinch rotate is desired. Default is true.

pinchZoom boolean | undefined

Whether pinch zoom is desired. Default is true.

zoomDelta number | undefined

Zoom delta.

zoomDuration number | undefined

Zoom duration.

Source:
  • interactiondefaults.js, line 30
Returns:

A collection of interactions to be used with the ol.Map constructor's interactions option.

Type
ol.Collection