Closed DavidHepper closed 5 years ago
We don't use Google Maps JavaScript API, only the Google Maps layers inside Open Layers (a subtle but important distinction). So the options for Google Maps don't apply here. We could, however, change our mapping code so scroll wheel zoom defaults to disabled, either globally, or just on the verification. I'm not sure how useful a feature it is given the potential for it causing problems you have described. I'll wait for @kitenetter to comment on the preferred approach.
@kitenetter Could we have a decision here? Random map zooms are still really annoying.
@johnvanbreda shame the ctrl key option isn't available, because I do find it useful to be able to zoom in and out of the maps using the mouse wheel, but I also recognise the difficulty that @DavidHepper highlights, and I think that the difficulty outweighs the convenience.
So I agree, let's disable the scroll wheel zoom.
It is more work but there is the possibility of overriding the current zoom function and inserting a conditional statement checking whether the control key is depressed.
An example of the function being overridden (for another purpose) is shown at https://stackoverflow.com/questions/23836895/openlayers-zoom-scroll-events-are-ignored-if-no-layers-are-visible
The source code has been moved on Github to https://github.com/openlayers/ol2/blob/master/lib/OpenLayers/Handler/MouseWheel.js
Another thought was to have a button on the map to allow scroll-wheel zooming to be turned on and off
I found a nice easy way to implement this so that you need to hold Ctrl to get the scroll wheel zoom to work using a keyMask propery on the MouseWheel handler. So, this is fixed ;)
Perfect! Such a relief. It could just do with a matching edit to the mouseover help for the Navigation icon to say that Ctrl+MouseWheel is needed for map scroll. Might there be any other help doc to update?
Hi @DavidHepper, I've updated the navigation icon hint in the develop branch of the code, so it will be updated on the live site at some point.
Google Maps now allows the developer to require that the Control (Ctrl) key be pressed for map zoom to occur. This works a treat. In iRecord a page is almost always longer than my screen. It drives me to distraction that I can scroll the page vertically using the mouse wheel but as soon as I hit a map the effect changes to zooming the map instead. I end up anywhere from Russia to St.Helena. Other verifiers agree. ( Originally reported in the iRecord Forum here ) Please! David