I'm trying to set scrolling to false on a Google Map, using Google Maps API. I have an Apple Magic Mouse which I think is causing a problem with the expected behavior.
Below is how I initialize the map, even though scrollWheel is set to false
it still scrolls when I scroll down the page. This is an unwanted effect because the map is displayed at the upper half of the screen and there's content below the map as well. I'm trying to avoid map scrolling and turning users crazy when the cursor hits the map canvas.
var map = new google.maps.Map(document.getElementById('canvas'), {
mapTypeId: mapTypeId,
mapTypeControl: false,
scrollWheel: false,
center: {lat: 52, lng: 6},
zoom: 4
});
When I try console.log(map.get('scrollWheel'));
it returns, as expected, false
.
Any suggestions on this?