Found a solution to disable scrollzoom.
‘
Instead of using
jQuery(document).ready(function($){
$(document).bind(’em_maps_location_hook’, function( e, map, infowindow, marker ){
map.scrollwheel = false;
});
});
USE
jQuery(document).ready(function($){
$(document).bind(’em_maps_location_hook’, function( e, map, infowindow, marker ){
// Disable scroll zoom on Google Maps
// Title: ‘How to disable mouse scroll-wheel scaling with Google Maps // API’ (see Stackoverflow)
map.set(‘scrollwheel’, false);
});
});
Also can use
map.setOptions({‘scrollwheel’: false});
‘
Hope that will works for you all!!
Hope also somebody can explain why map.scrollwheel = false; is not working anymore.
jQuery(document).ready(function($){
$(document).bind('em_maps_location_hook', function( e, map, infowindow, marker ){
map.set('scrollwheel', false);
});
});
This worked. Thanks a lot, Bettercallsaul!
@daedalon – Which file and where do I put that snippet in?
Joinfof: We have the above in a custom .js file as part of our custom plugin. From scratch, do roughly this:
1. Create a custom plugin with one .php file and on .js file
2. Add that code to the .js file
3. Add to the .php file a piece of code that enqueues the .js file on every page (or only on those you want)
4. Enable the plugin in your admin panel
There should be plenty of instructions how to do this. We ended up with our solution by checking how the plugins we use did these things.