Classes
- DoubleClickZoom
- DragAndDrop
- DragAndDropEvent
- DragBox
- DragPan
- DragRotate
- DragRotateAndZoom
- DragZoom
- Draw
- DrawEvent
- Interaction
- KeyboardPan
- KeyboardZoom
- Modify
- ModifyEvent
- MouseWheelZoom
- PinchRotate
- PinchZoom
- Pointer
- Select
- SelectEvent
- Snap
- Translate
- TranslateEvent
Methods
-
ol.interaction.defaults(opt_options){ol.Collection.<ol.interaction.Interaction>}
src/ol/interaction/interactiondefaults.js, line 40 -
Set of interactions included in maps by default. 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.Interactioninstances and insert them into aol.Collectionin the order you want before creating yourol.Mapinstance. The default set of interactions, in sequence, is:Name Type Description optionsDefaults options.
Name Type Description altShiftDragRotateboolean | undefined experimental Whether Alt-Shift-drag rotate is desired. Default is
true.doubleClickZoomboolean | undefined experimental Whether double click zoom is desired. Default is
true.keyboardboolean | undefined experimental Whether keyboard interaction is desired. Default is
true.mouseWheelZoomboolean | undefined experimental Whether mousewheel zoom is desired. Default is
true.shiftDragZoomboolean | undefined experimental Whether Shift-drag zoom is desired. Default is
true.dragPanboolean | undefined experimental Whether drag pan is desired. Default is
true.pinchRotateboolean | undefined experimental Whether pinch rotate is desired. Default is
true.pinchZoomboolean | undefined experimental Whether pinch zoom is desired. Default is
true.zoomDeltanumber | undefined experimental Zoom delta.
zoomDurationnumber | undefined experimental Zoom duration.
Returns:
A collection of interactions to be used with the ol.Map constructor's interactions option.
Type Definitions
-
ol.interaction.DragBoxEndConditionType() experimental
src/ol/interaction/dragboxinteraction.js, line 90 -
A function that takes a
ol.MapBrowserEventand twool.Pixels and returns a{boolean}. If the condition is met, true should be returned. -
ol.interaction.DrawGeometryFunctionType() experimental
src/ol/interaction/drawinteraction.js, line 853 -
Function that takes coordinates and an optional existing geometry as arguments, and returns a geometry. The optional existing geometry is the geometry that is returned when the function is called without a second argument.
-
ol.interaction.SelectFilterFunction() experimental
src/ol/interaction/selectinteraction.js, line 43 -
A function that takes an
ol.Featureorol.render.Featureand anol.layer.Layerand returnstrueif the feature may be selected orfalseotherwise.
OpenLayers 3