Unwanted scrolling of Google Maps in mobile view

I’m having a bothersome issue with Google Maps and hopefully I’m just missing something in the settings. When scrolling/thumbing down a page on mobile devices and you come to a Google map, the map starts scrolling and not the page which often causes the visitor to lose our location on the map. Is there a way to lock the map in place to prevent a mobile visitors thumb from moving it around in the frame?

Thanks,

Larry

  • Rupok
    • Support Ninja

    Hi Larry

    Hope you had a wonderful day.

    Yes, you can disable scroll from Google Maps Settings. Go to your WordPress Dashboard > Settings > Google Maps > Scroll Down to "Add-ons" Section" and then activate the "Disable scroll" add-on. Please check the attached screenshot for reference.

    Now you can disable scroll with additional parameter in your shortcode. Please let us know if you have any confusion. We will be glad to help.

    Have a nice day. Cheers!

    Rupok

  • lbartley
    • The Incredible Code Injector

    Thanks Rupok- I’ve tried both the “disable scroll” option and the shortcode option. I’ve succeeded in the disabling scroll on touch screen laptops and tablets but the scrolling still persists with iPhones. I’m in a local area where we’re about 72% iPhone users so this is a bit of concern to my client. Any other ideas?

  • Kasia Swiderska
    • Support nomad

    Hello lbartley,

    I’ve checked your site and was able to replicate this issue also on my testing site. Problem is that on iPhone this is not handled by the scrolling event but draggable.

    This is only a workaround but I prepared, only for this case, small modification in plugin file. When scrolling is disabled it will also disable dragging.

    Replace file from here /wp-content/plugins/wpmu_dev_maps_plugin/js/user/disable-scroll.min.js with one you will unzipp from attachment. Please make a copy of file you are replacing.

    Let me know if this works for you.

    kind regards,

    Kasia

  • lbartley
    • The Incredible Code Injector

    Thanks Kasia- I followed your instructions and replaced the disable-scroll file with yours but I still have the same issue on my iPhone. 1 question though- If I do successfully keep the map from dragging will that prevent the whole page from dragging up and down as well? Please advise if you have other ideas.

    Larry

  • Kasia Swiderska
    • Support nomad

    Hello Larry,

    Found the culprit! Script I gave you works, but only if the disable_scroll=”true” is added to the map shortcode.

    I just checked on my iPhone after this change and map is not draggable anymore. Please check this also (you might need to check on other browser as Safari likes sometimes to cache websites).

    If I do successfully keep the map from dragging will that prevent the whole page from dragging up and down as well?

    No, this will be only for the map – it will be treated as image, site will be still draggable.

    kind regards,

    Kasia

  • lbartley
    • The Incredible Code Injector

    Thank you Kasia-

    I already had that in my shortcode but it didn’t effect your other suggestion last night. When I look at it on my iPhone today it appears dragging IS in fact locked for the map. I guess it was a caching issue that finally resolved itself.

    I appreciate your help.

    Larry

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.