disable mousewheel scrolling in google map plugin

Apparently in V3 of the google API, you can disable this using

scrollwheel: false

But unsure how to include this so that it actually works...
Does anyone know how this could be implemented?

  • DavidM
    • DEV MAN’s Mascot

    Hi Andrew!

    That's a good idea for a request actually! I've gone ahead and moved this over the Feature Suggestion forum and we can take a look and see if anyone else is interested in having the option to disable the scrollwheel on a map.

    In the meantime, you can make a tiny code edit to achieve that as follows.

    On line 219 of wpmu_dev_maps_plugin/js/google_maps_user.js you can add in the following:
    "scrollwheel": false,

    And with that, the code look like this.

    map = new google.maps.Map($('#' + mapId).get(0), {
    	"scrollwheel": false,
    	"zoom": parseInt(data.zoom),
    	"center": new google.maps.LatLng(40.7171, -74.0039), // New York
    	"mapTypeId": google.maps.MapTypeId[data.map_type]

    That said, anyone else looking for an integrated scrollwheel enable/disable option?

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.