How can I DISABLE initial AJAX call on Map View

Home Forums Calendar Products Events Calendar PRO How can I DISABLE initial AJAX call on Map View

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1362904
    Alex Donovan
    Participant

    Hello!

    I am currently hijacking the map view allow users to see events closest to them. I am able to accomplish this by setting some hidden fields and then forcing the form to submit via javascript. It works perfectly. However on page load, the map does an initial AJAX load of events. How can I disable this?

    Any help would be great! Thanks so much!

    #1363520
    Cliff
    Member

    Hi, Alex. I’ve pinged a developer to give this one a look for you. I hope to get back to you by Mon/Tues next week. Thanks for your understanding and patience.

    #1364621
    Alex Donovan
    Participant

    Okay great. Thank you!

    #1364947
    Cliff
    Member

    Alex, we’ve been a bit swamped here. I’ve checked with the developer assigned to help us here and we should get a reply to you by the end of this week. Sorry for the delay.

    #1366781
    Cliff
    Member

    Thanks for your patience.

    Turns out there’s not a straight-forward way to do exactly what you’re asking. Therefore, an alternative idea to modify the map view JS to avoid the initial Ajax request is to alter the result of it (i.e. alter the query that is performed when the request is processed).

    By using the wp_ajax_tribe_geosearch and wp_ajax_nopriv_tribe_geosearch hooks — early, like priority 5 — you could completely override what we do.

    Or you could use those to listen for the request and then hook into the various event query actions to modify things there.

    Or you could use the tribe_events_ajax_response hook to alter what comes back.

    Hopefully this is enough technical information for you to get moving forward on this.

    Please let me know how this goes for you.

    #1380611
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘How can I DISABLE initial AJAX call on Map View’ is closed to new replies.