I am trying to disable dragging on Google Maps when viewing on a mobile device, so that it is touch-screen friendly.
Before I updated Enfold to the latest version, this trick worked. Since the update, I switched from using the GMap widget to the GMap media element in the Advanced Editor. Now, it no longer works, and mobile devices can drag the map around. I’m assuming this is because the original trick edited the widget, but the new media element is isolated from that PHP file.
I am running the latest version of Enfold, with all plugins turned off.
What do you advise?
Thank you, and keep up the great work!
Hey BMart!
Please edit js > shortcodes.js, find this code on line 247:
mapTypeId:google.maps.MapTypeId.ROADMAP,
center: new google.maps.LatLng(this.$data.marker[0].lat, this.$data.marker[0].long)
Replace it with:
mapTypeId:google.maps.MapTypeId.ROADMAP,
center: new google.maps.LatLng(this.$data.marker[0].lat, this.$data.marker[0].long),
draggable: false
Cheers!
Ismael
That did the trick!
Thank you Ismael!