Organizational Research By

Surprising Reserch Topic

How can i disable mouse scroll-wheel scaling with Google Maps API


I am using Google Maps API (v3) to draw a few maps on a page. One thing I'd like to do is disable zooming when you scroll the mouse wheel over the map, but I'm unsure how.

I have disabled the scaleControl (ie removed the scaling UI element) but this doesn't prevent scrollwheel scaling.

Here is part of my function (it's a simple jQuery plugin):

$.fn.showMap = function(options, addr){
  options = $.extend({
    navigationControl: false,
    mapTypeControl: false,
    scaleControl: false,
    draggable: false,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  }, options);
  var map = new google.maps.Map(document.getElementById($(this).attr('id')), options);
  // code cut from this example as not relevant

asked May 26, 2015 in JAVASCRIPT by rajesh
0 votes

Related Hot Questions

2 Answers

0 votes
Best answer
answered May 26, 2015 by rajesh
0 votes
answered May 26, 2015 by rajesh