When using a trackpad or
magic mouse, zoom to the closest integer zoom level after the scroll gesture
ends.
useAnchor
boolean
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.
Methods
setMouseAnchor(useAnchor)
interaction/MouseWheelZoom.js, line 185
Enable or disable using the mouse's location as an anchor when zooming
Name
Type
Description
useAnchor
boolean
true to zoom to the mouse's location, false
to zoom to the center of the map