1

I'm trying to obtain the following behaviour in Google Maps V3:

  1. Map Dragging disabled, so the map center won't be missing while the user uses the mouse
  2. Map Zooming enabled, so the map details can be adjusted upon customer needs using the wheelmouse

To obtain this I use the following settings:

map = new google.maps.Map(document.getElementById('map_canvas'), {
        center : new google.maps.LatLng(41, 14),  
        zoom : 13,
        mapTypeId : google.maps.MapTypeId.TERRAIN,                      
        mapTypeControl: true,
        mapTypeControlOptions: {
            style: google.maps.MapTypeControlStyle.DROPDOWN_MENU        
            },
        draggable: false,
        scrollwheel: true,
        streetViewControl: true,
        fullscreenControl: true,
        scaleControl: true,
        rotateControl: true,
        overviewMapControl: true,
        overviewMapControlOptions: {opened: true},
        gestureHandling: 'greedy'
        });

But doesn't work, while if I set draggable: true, then the scrollwheel feature will be enabled as well. In other words it looks like to have scrollwheel: true we must also set draggable:true otherwise the setting will be ignored. Any clue?

Power Engineering
  • 713
  • 14
  • 26
  • Your code works fine here: http://jsfiddle.net/4mtyu/3836/ Or I am missing requirements? – Ivan Jovović Feb 19 '18 at 11:00
  • You're right @IvanJovović . I've just seen that! So maybe my code doesn't work as my map is inside a [Jarvis widget](http://data.edwardsaquifer.org/widgets.php) window. The behaviour is incredible: if dragging is enabled then the wheelzoom works fine but if the dragging isn't enabled the wheelzoom operation is ignored. Very strange. – Power Engineering Feb 19 '18 at 11:26

0 Answers0