Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #273453

    twobeans
    Participant

    Hi there,

    I would like to stop google map zooming in with mouse wheel, but retain the rest of the functionalities, map marker and map marker box, manual zoom, etc. I can stop map zooming with CSS, but my code freezes the whole map and removes mentioned functionalities. Is there a code to stop just the mouse wheel zoom?

    W: http://twobeans.ie/index.php/contact/
    X: v. 3.2.3
    WP: v. 4.2.2

    Many Thanks in advance,
    Bobby

    #273510

    Paul R
    Moderator

    Hi Bobby,

    To prevent scroll, you can add this under Custom > CSS in the Customizer.

    
    .page-id-617 #x-content-band-5 .x-map .x-map-inner iframe {
         pointer-events: none;
    }
    

    Hope that helps.

    #274222

    twobeans
    Participant

    Awesome! Works like a dream. Thanks a million.

    #274224

    Rue Nel
    Moderator

    You are most welcome!
    We are super glad it worked out for you.

    If there’s anything else, we can help you with, please let us know.

    #274230

    twobeans
    Participant

    Ahh – Sorry, jumped the gun there! Thats what I meant by “I can stop map zooming with CSS, but my code freezes the whole map and removes mentioned functionalities.” – if you check my map now, you will see that +/- and directions link are also disabled. Is there a way to stop JUST the mouse wheel? Thanks!

    #274234

    Rue Nel
    Moderator

    Hello There,

    Please try to edit your contact page and change the zoom control of your Google Map settings.

    This allows to disable the zoom control of the map.

    Hope this helps.

    #274243

    twobeans
    Participant

    Hi, sorry I don’t have that setting. I use “map” widget within column where I have inserted an iframe. Tried using ‘Google map” but its not rendering the address correctly, hence using an iframe.

    #274263

    Zeshan
    Member

    Hi there,

    If you are using an iframe, unfortunately, it’s not possible to disable the zoom on an iframe. It’s only possible if you are using advanced [google_map] shortcode: http://theme.co/x/demo/integrity/1/shortcodes/map/

    Thanks!

    #274265

    twobeans
    Participant

    OK Thanks.

    #274273

    Paul R
    Moderator

    You’re welcome!