Support Forums

Turn off auto-scrolling on google maps

  • Posts: 46 Topics: 21 Answers: 1
    | Permalink

    Hi guys,

    I was wondering how I go about turning off the auto scrolling for the Google imbedded map. I want to set it so that when users scroll down the page they don’t set off the map scrolling at the same time. Do you know what I’m trying to say? Sorry if this is unclear.

    Posts: 8 Topics: 1 Answers: 1
    | Permalink

    I’d like to know this too if possible.

    Posts: 4278 Topics: 105 Answers: 467
    | Permalink

    Hey guys. Interesting question; not sure about whether this is doable myself (I’d imagine so), but let me see if Jonah has any ideas when he hits the forums later this afternoon. Stay tuned.

    Posts: 4021 Topics: 4 Answers: 763
    | Permalink

    Hi Robert, not sure about the answer to this one either. I’ll need to ask one of the other devs. Stay tuned.

    Posts: 82 Topics: 7 Answers: 7
    | Permalink

    i hate it when i come across a Google map, want to scroll down the webpage as a whole only to find that my blasted Google map zooms-in upon scroll.

    i’ve worked with Google maps before and it is certainly do able. Are you using a mapping plugin? or are you embedding Google maps yourself?

    You just have to add scrollwheel: false to mapOptions when initialising the map.

    For example

    http://pastie.org/3701210

    Posts: 46 Topics: 21 Answers: 1
    | Permalink

    Hi Henry,
    It’s not a separate plugin but the google maps function on the events plugin itself.
    Really appreciate the help. I’ll give it a try and let you know the result.

    Posts: 46 Topics: 21 Answers: 1
    | Permalink
    Correct Answer

    The fix is really easy, thanks Henry!
    For others with this issue.
    Locate the plugin file: the-events-calendar/admin-views/event-map.php
    Add the line: scrollwheel: false,
    Save and you’re done. Check out the pastebin below to see exactly where to add the code.
    http://pastebin.com/weSav9UD

    Posts: 10 Topics: 2
    | Permalink

    Works like a charm! This was bugging me too! thanks for posting the solution.

    Posts: 82 Topics: 7 Answers: 7
    | Permalink

    Glad it worked :}

    Posts: 4278 Topics: 105 Answers: 467
    | Permalink

    Thank you Henry!

    Posts: 14 Topics: 6
    | Permalink

    i’m updated and don’t see that file…event-map.php is it now somewhere else?

    Posts: 17125 Topics: 11 Answers: 973
    | Permalink

    This is a comparatively old thread – while they’re definitely worth reviewing it’s normally best to create a fresh thread of your own if you need further help since, typically, things have changed the answer is often slightly different.

    Please do check out our Themer’s Guide in the first instance, though, and if you still require help after that we’ll be happy to assist 🙂

The topic ‘Turn off auto-scrolling on google maps’ is closed to new replies.