Google Maps API – Disable Scroll Wheel Zoom

The Google Maps API overrides the scroll functionality of the scrollwheel so it zooms the map, this often causes problems when you have a large map spanning the page.

To prevent this in V3 of the Maps API add:

  1. scrollwheel: false

To your mapOptions when initialising the map.

For example:

  1.  
  2. var mapOptions = {
  3. zoom: 14,
  4. center: point,
  5. mapTypeId: google.maps.MapTypeId.SATELLITE,
  6. scrollwheel: false
  7. }
  8.  
  9. map = new google.maps.Map(document.getElementById("map"), mapOptions);
  10.  

7 thoughts on “Google Maps API – Disable Scroll Wheel Zoom

  1. Pingback: Tweets that mention Google Maps API – Disable Scroll Wheel Zoom | Ben Collier -- Topsy.com

  2. little confused at how to implement this direction. when you say initializing i’m thinking about opening a program but i have this problem when viewing maps in a browser. is that the html for the map display on a web page. how would i intercept that and add the direction (or am i changing an existing line “Scrollwheel: true” to read false?

    Is there a way I can direct the browser to insert the “false” anytime I open a page with the url maps.google.com?

    there aren’t enough symbol keys to display how much i hate this ‘feature’.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>