Forums

Events Manager
[resolved] Disable scroll zoom on Google Maps (4 posts)

  1. Daedalon
    Member
    Posted 5 months ago #

    We've gotten complaints from irritated users who scroll the page using mouse wheel and end up having their map zoomed instead. http://stackoverflow.com/a/2330272 shows how to fix this with a Google Maps setting.

    1. Could this be implemented in plugin core? Either as always-disabled or as a setting.
    2. While waiting for the possible core support, is there a way to implement this in our customizations?

    http://wordpress.org/extend/plugins/events-manager/

  2. agelonwl
    Member
    Posted 5 months ago #

    hi,

    try this snippet in your theme header.php (below wp_head)

    <script type="text/javascript">
    jQuery(document).ready(function($){
     jQuery(document).bind('em_maps_location_hook', function( e, map, infowindow, marker ){
      map.scrollwheel = false;
     });
    });
    </script>
  3. Daedalon
    Member
    Posted 5 months ago #

    That worked, thanks! To be exact, I added this part to our custom .js file inside the main document.ready function:

    $(document).bind('em_maps_location_hook', function( e, map, infowindow, marker ){
    	map.scrollwheel = false;
    });
  4. Daedalon
    Member
    Posted 2 months ago #

    This does not affect the map on Add / Edit Event / Location pages. How can I disable mouse wheel scroll zoom on those pages?

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.