TransWikia.com

How to synch Zoom control and MouseWheelZoom interaction in OpenLayers 6?

Geographic Information Systems Asked on November 29, 2021

In OpenLayers v6.3.1 the map has a Zoom control and MouseWheelZoom is enabled. The map view has 10 resolutions.

In OpenLayers v5 prior to v6 using either the Zoom control or the MouseWheelZoom correctly incremented or decremented the map zoom level to one of the 10 possible zoom levels. Since upgrading the OpenLayers v6.3.1 the Zoom control works correctly for changing zoom level between the 10 levels. However, the MouseWheelZoom increments are greater, resulting in the map being zoomed to resolutions that are now part of the 10 resolutions defined for the view. In addition, the Zoom control does not move in synch w/ the MosueWheel.

How do you configure the MouseWheelZoom so it increments the same way as the Zoom control?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP