Namespace: interaction

olx. interaction

Type Definitions

experimental olx.interaction.DefaultsOptionsObject

Interactions for the map. Default is true for all 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.

experimental olx.interaction.DoubleClickZoomOptionsObject

Properties:
Name Type Description
duration number | undefined

Animation duration in milliseconds. Default is 250.

delta number | undefined

The zoom delta applied on each double click, default is 1.

experimental olx.interaction.DragAndDropOptionsObject

Properties:
Name Type Description
formatConstructors Array.<function(new:ol.format.Feature)> | undefined

Format constructors.

reprojectTo ol.proj.ProjectionLike

Target projection. By default, the map's view's projection is used.

experimental olx.interaction.DragBoxOptionsObject

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 always.

style ol.style.Style

Style for the box.

experimental olx.interaction.DragPanOptionsObject

Properties:
Name Type Description
kinetic ol.Kinetic | undefined

Kinetic inertia to apply to the pan.

experimental olx.interaction.DragRotateAndZoomOptionsObject

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 shify key.

experimental olx.interaction.DragRotateOptionsObject

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 both shift and alt keys.

experimental olx.interaction.DragZoomOptionsObject

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 shift key.

style ol.style.Style

Style for the box.

experimental olx.interaction.DrawOptionsObject

Properties:
Name Type Description
features ol.Collection | undefined

Destination collection for the drawn features.

source ol.source.Vector | undefined

Destination source for the drawn features.

snapTolerance number | undefined

Pixel distance for snapping to the drawing finish (default is 12).

type ol.geom.GeometryType

Drawing type ('Point', 'LineString', 'Polygon', 'MultiPoint', 'MultiLineString', or 'MultiPolygon').

minPointsPerRing number | undefined

The number of points that must be drawn before a polygon ring can be finished (default is 3).

style ol.style.Style | Array.<ol.style.Style> | ol.feature.StyleFunction | undefined

Style for sketch features.

experimental olx.interaction.KeyboardPanOptionsObject

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.

experimental olx.interaction.KeyboardZoomOptionsObject

Properties:
Name Type Description
duration number | undefined

Animation duration in milliseconds. Default is 100.

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.

delta number | undefined

The amount to zoom on each key press. Default is 1.

experimental olx.interaction.ModifyOptionsObject

Properties:
Name Type Description
deleteCondition ol.events.ConditionType | undefined

Condition that determines which event results in a vertex deletion. Default is a singleclick event with no modifier keys.

pixelTolerance number | undefined

Pixel tolerance for considering the pointer close enough to a segment or vertex for editing. Default is 10 pixels.

style ol.style.Style | Array.<ol.style.Style> | ol.feature.StyleFunction | undefined

FeatureOverlay style.

features ol.Collection

The features the interaction works on.

experimental olx.interaction.MouseWheelZoomOptionsObject

Properties:
Name Type Description
duration number | undefined

Animation duration in milliseconds. Default is 250.

experimental olx.interaction.PinchRotateOptionsObject

Properties:
Name Type Description
threshold number | undefined

Minimal angle in radians to start a rotation. Default is 0.3.

experimental olx.interaction.PinchZoomOptionsObject

Properties:
Name Type Description
duration number | undefined

Animation duration in milliseconds. Default is 400.

experimental olx.interaction.SelectOptionsObject

Properties:
Name Type Description
addCondition ol.events.ConditionType | undefined

A conditional modifier (e.g. alt key) that determines if the feature is added to the current selection. By default, this is never. Note that the default toggle condition allows features to be added.

condition ol.events.ConditionType | undefined

A conditional modifier (e.g. shift key) that determines if the interaction is active (i.e. selection occurs) or not. By default, a click with no modifier keys toggles the selection.

layers Array.<ol.layer.Layer> | function

A list of layers from which features should be selected. Alternatively, a filter function can be provided. The function will be called for each layer in the map and should return true for layers that you want to be selectable. If the option is absent, all visible layers will be considered selectable.

style ol.style.Style | Array.<ol.style.Style> | ol.feature.StyleFunction | undefined

FeatureOverlay style.

removeCondition ol.events.ConditionType | undefined

A conditional modifier (e.g. alt key) that determines if the feature is removed from the current selection. By default, this is never.

toggleCondition ol.events.ConditionType | undefined

A conditional modifier (e.g. shift key) that determines if the selection is toggled in the current selection. By default, a shift-click toggles the feature in the current selection.