Skip to content

Instantly share code, notes, and snippets.

@MOgorodnik
Last active October 12, 2016 11:05
Show Gist options
  • Save MOgorodnik/940b2550a1ce8bb283bbe9eb5ee5d408 to your computer and use it in GitHub Desktop.
Save MOgorodnik/940b2550a1ce8bb283bbe9eb5ee5d408 to your computer and use it in GitHub Desktop.
Scroll under map, zoom after click and scroll again after mousout
google.maps.event.addListener(map, 'click', function(event){
this.setOptions({scrollwheel:true});
});
google.maps.event.addListener(map, 'mouseout', function(event){
this.setOptions({scrollwheel:false});
});
google.maps.event.addListener(map, 'click', function(event){
this.setOptions({draggable:true });
});
google.maps.event.addListener(map, 'idle', function(event){
this.setOptions({draggable:false });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment