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.  

5 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

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>