Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter wlsfh

    (@wlsfh)

    More specifically I am using a floating map in my layout and I tried to use the shortcode

    [gmw map=”2″ scrollwheel_map_zoom=”0″]

    but does not work.
    Any idea?

    Thanks

    Plugin Author Eyal Fitoussi

    (@ninjew)

    Hello @wlsfh,

    I apologize for not replying sooner. I have just noticed your support ticket.

    It is not possible to disable the mouse scroll zoom using a shortcode attribute, but it should be possible using the script below:

    
    function gmw_disable_mousescroll_zoom( $map_elements, $gmw ) {
    
    	if ( 2 == $gmw['ID'] ) {
    		$map_elements['map_options']['scrollwheel'] = false;
    	}
    
    	return $map_elements;
    }
    add_filter( 'gmw_map_element', 'gmw_disable_mousescroll_zoom', 99, 2 );
    

    I hope this helps.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Disable map zoom on mouse scroll’ is closed to new replies.