Diable Google Maps scrolling:
I was facing issue with Google Maps API version 3. On page scroll, google maps scroll should be disabled i.e. I have to disable zooming when you scroll on the map. So this is how I have fixed this issue. Write this code:
$.fn.showMap = function(options, addr){
options = $.extend({
scrollwheel: false,
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
};
set scrollwheel
to false, all done!
Thanks for reading the blog.
0 Comment(s)