Found this code on the forum that works great when accessing the page on desktop devices. But it doesn’t seem to prevent scrolling on mobile devices. How can I solve this?
var myOptions = {
scrollwheel: false,
zoom:”.$zoom.”,
mapTypeControl:true,
mapTypeId:google.maps.MapTypeId.”.$type.”,
mapTypeControlOptions:{style:google.maps.MapTypeControlStyle.DROPDOWN_MENU},
navigationControl:true,
navigationControlOptions:{style:google.maps.NavigationControlStyle.SMALL},
center:latlng
};
I want to prevent any accidental movement on the map when accessing it on a mobile device.
Hi!
Please edit your Google Maps element and check “Map dragging on mobile” – http://i.imgur.com/02sJxXN.png
Cheers!
Yigit
Thanks Yigit! Works great!