Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dealing with the scrollwheel option #80

Open
GoogleCodeExporter opened this issue Nov 27, 2015 · 1 comment
Open

Dealing with the scrollwheel option #80

GoogleCodeExporter opened this issue Nov 27, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

Hi,

I`m having troubles setting the maps to not scroll on mouse hover. So, my code 
is:

jQuery(function() {
    jQuery('#googlemap').gmap().bind('init', function(ev, map) {
        jQuery('#googlemap').gmap('addMarker', {'position': '48.857261,2.348961', 'bounds': true}).click(function() {
            jQuery('#googlemap').gmap('openInfoWindow', {'content': 'Tooltip Text', 'maxWidth' : 600}, this);
        });
        jQuery('#googlemap').gmap('option', 'zoom', <?php echo $zoom; ?>);
        jQuery('#googlemap').gmap('option', 'scrollwheel', false);
        jQuery('#googlemap').gmap('option', 'mapTypeId', google.maps.MapTypeId.ROADMAP);            
    });
});

The scrollwheel parameter seems to be disabled and the map can be zoomed out 
and in on mouse scroll wheel. Any thoughts on this?

Thank you!
Madalin

Original issue reported on code.google.com by [email protected] on 6 Sep 2013 at 3:17

@GoogleCodeExporter
Copy link
Author

I have same problem, I couldn't able to disable mouse scroll over map.

Please revert back with the solution.

Code: 
$('#map_canvas').gmap().bind('init', function(ev, map) { 
        jQuery('#map_canvas').gmap('option', 'scrollwheel', false);   
         jQuery.each( jsonobj, function(key, obj) {
           $('#map_canvas').gmap('addMarker', {'icon': {url: '<%=request.getContextPath()%>/resources/make/images/icon.png'},'position': obj.latLong,'bounds': true}).click(function() {
                            $('#map_canvas').gmap('openInfoWindow', {'content': obj.content}, this);  

                        });

Original comment by [email protected] on 10 Jun 2014 at 7:02

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant