Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #239609

    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!

    #239928

    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

    #240281

    That did the trick!

    Thank you Ismael!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Google Map Mobile Dragging’ is closed to new replies.