This would be handy as I often find myself attempting to scroll the page and inadvertently zooming the map by mistake.
You will be able to disable the scroll wheel action on the map through the settings page in 2.0. But until then you will have to edit the code to disable it.
Open the /js/wpsl-gmap.js file and look or ‘myOptions =’, this is near the top of the file inside then ‘function initializeGmap()’.
Replace the myOptions with this, I added ‘scrollwheel: false’.
myOptions = {
zoom: zoomLevel,
center: startLatLng,
mapTypeId: mapType,
mapTypeControl: false,
panControl: false,
scrollwheel: false,
streetViewControl: streetViewVisible,
zoomControlOptions: {
style: zoomControlStyle,
position: zoomControlPosition
}
};
Thread Starter
armix
(@armix)
I’ve made the changes you mentioned (added scrollwheel: false) but still see map traps when scrolling on the site or especially mobile. Any other recommendations? I know the website like airbnb.com has a map on a listing that is “static” map until you click there.
any advice?
thanks