[OpenLayers-Users] Mouse wheel scroll limitation in OpenLayers 3

agelos at smartcode.gr agelos at smartcode.gr
Thu Mar 5 13:36:02 PST 2015


Hi list,

I know that the OpenLayers 3 ol.interaction.MouseWheelZoom accumulates
mouse wheel events for an amount of time before it actually fires the
event, which is a wanted behavior. However it seems that it limits the
maximum zoom step to a constant range. I came to this conclusion by
inspecting the function

"ol.interaction.MouseWheelZoom.prototype.doZoom_"

and specifically the lines:
var maxDelta = ol.MOUSEWHEELZOOM_MAXDELTA;
var delta = goog.math.clamp(this.delta_, -maxDelta, maxDelta);

of the ol.interaction.MouseWheelZoom source found at:
https://github.com/openlayers/ol3/blob/master/src/ol/interaction/mousewheelzoominteraction.js

In my application this is an unwanted feature, as the user needs to be
able to zoom as much and as quickly as possible. Is there a way to
overcome this limitation e.g. by building a custom interaction or altering
my map configuration somehow?

Regards
Agelos




More information about the Users mailing list