Reputation:
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
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
Reputation: 10809
According to the Google Map API doc you have to set
scrollwheel
asfalse
.
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