We would like to request the addition of gesture handling support for the "Open Street Maps" field in MetaBox. This feature enhances usability, especially on touch devices, by preventing unintended map zooming while scrolling the page.
A straightforward way to implement this is by integrating the Leaflet.GestureHandling package, which is available at:
https://github.com/elmarquis/Leaflet.GestureHandling
Proposed Implementation:
Include the GestureHandling library in the relevant scripts.
Modify the following files to enable gesture handling:
File: /meta-box-aio/vendor/meta-box/meta-box/js/osm.js (Line 48)
Before:
this.map = L.map( this.canvas, { zoom: 14 } );
After:
this.map = L.map(this.canvas, { zoom: 14, gestureHandling: true });
File: /meta-box-aio/vendor/meta-box/meta-box/js/osm-frontend.js (Line 21)
Before:
map = L.map( this, mapOptions );
After:
mapOptions.gestureHandling = true;
map = L.map( this, mapOptions );
This small addition would significantly improve the user experience on mobile and touch-enabled devices.
Would it be possible to include this in a future update of MetaBox?
Please let us know if you need further details.
Thank you for your time and consideration!