Module: ol/interaction/MouseWheelZoom

ol/interaction/MouseWheelZoom


Classes

MouseWheelZoom

Members

Mode{string}

Properties:
Name Type Default Description
TRACKPAD string trackpad
WHEEL string wheel

Type Definitions

Options{Object}

Properties:
Name Type Argument Default Description
condition module:ol/events/condition~Condition <optional>

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

duration number <optional>
250

Animation duration in milliseconds.

timeout number <optional>
80

Mouse wheel timeout duration in milliseconds.

constrainResolution boolean <optional>
false

When using a trackpad or magic mouse, zoom to the closest integer zoom level after the scroll gesture ends.

useAnchor boolean <optional>
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.