jainshravan123 / jquery-ui-map

Automatically exported from code.google.com/p/jquery-ui-map
0 stars 0 forks source link

Dealing with the scrollwheel option #80

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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 madalint...@gmail.com on 6 Sep 2013 at 3:17

GoogleCodeExporter commented 9 years ago
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 aleem.btech@gmail.com on 10 Jun 2014 at 7:02