user7337911
user7337911

Reputation:

EASY way to disable mouse scroll on Google Maps

I've been trying to disable the mouse scroll on a simple embeded Google maps. I've found a ton of answers for this on star overflow, but I'm afraid I don't understand how to implement them... Could someone help explain step by step how to disable the mouse scroll? Here's the page if that helps: http://www.intheloup.la/en/baroo/

Thanks a million and happy holidays, Victoire

Upvotes: 0

Views: 1279

Answers (2)

Mr Giggles
Mr Giggles

Reputation: 2104

From looking at the source code in your site you are using a plug in called 'snazzy maps'.

They may have a settings option or additional documentation you can reference.

The answer by Raunak Gupta will work if you have access to the JavaScript that builds the map for you, however the plug in developers may have coded a solution for users to do this themselves.

I hope that helps point you in the right direction to get this working.

Upvotes: 0

Raunak Gupta
Raunak Gupta

Reputation: 10809

According to the Google Map API doc you have to set scrollwheel as false.

As you didn't share your Map related JavaScript code so I cannot say exactly how to use or where to write, So I'm assuming your code is similar to the Google Simple Map example:

<script>
  var map;
  function initMap() {
    map = new google.maps.Map(document.getElementById('map'), {
      center: {lat: -34.397, lng: 150.644},
      zoom: 8, //<-- you also need to set a default zoom between 0 to 11
      scrollwheel: false //<--- You have to add this
    });
  }
</script>

Hope this helps!

Upvotes: 1

Related Questions