Module: ol/interaction/MouseWheelZoom

ol/interaction/MouseWheelZoom


Classes

MouseWheelZoom

Type Definitions

Mode{'trackpad'} {'wheel'}

Options{Object}

Properties:
Name Type Description
condition Condition | undefined

A function that takes a MapBrowserEvent and returns a boolean to indicate whether that event should be handled. Default is always.

onFocusOnly boolean
(defaults to false)

When the map's target has a tabindex attribute set, the interaction will only handle events when the map has the focus.

maxDelta number
(defaults to 1)

Maximum mouse wheel delta.

duration number
(defaults to 250)

Animation duration in milliseconds.

timeout number
(defaults to 80)

Mouse wheel timeout duration in milliseconds.

useAnchor boolean
(defaults to true)

Enable zooming using the mouse's location as the anchor. When set to false, zooming in and out will zoom to the center of the screen instead of zooming on the mouse's location.

constrainResolution boolean
(defaults to false)

If true, the mouse wheel zoom event will always animate to the closest zoom level after an interaction; false means intermediary zoom levels are allowed.