Conflict with Infinite Scroll

Home Forums MapPress Support Conflict with Infinite Scroll

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #15411
    lsterling03
    Participant

    When using Infinite Scroll and MapPress, the MapPress map does not load on any “pages” other than the first page. I think I somehow need to re-initialize MapPress each time the Infinite Scroll pagination is clicked. Is this possible? Is there function to reinitialize in a callback?

    #15412
    lsterling03
    Participant

    I should clarify that Infinite Scroll does offer a callback for just this purpose, and I have used it successfully with some other scripts (a slider, a lightbox…). I just don’t know how to reinitialize MapPress since it’s a plugin and not a simple script that I loaded myself.

    Also, this doesn’t happen with all plugins. For example, I have a Facebook plugin that uses a shortcode to display my facebook feed. And that loads fine on all “pages” of the infinite scroll.

    Thank you!

    #15415
    Chris
    Keymaster

    Hi,

    I’m sorry, but I don’t think it will be possible to display the maps inside the infinite scroll area.

    Because the Google Maps API is large, MapPress only outputs its scripts and map data (POIs, styles, etc.) when a map shortcode is present in the current post. They are output in the blog footer, during the wp_footer() function call.

    My guess is the scroller is fetching the post content for each page, but not the footer. That makes sense for the scroller – but in this case the footer would normally contain the map scripts and data. Without them, it won’t be possible to just call an ‘initialize’ function and draw the map.

    #15434
    lsterling03
    Participant

    Thank you. Is it possible to force wp_footer() in the Infinite Scroll callback so that the map script will load each time the “Load More Posts” button is clicked? Are there problems associated with doing that? (Aside from it being annoying to HAVE to do something like that?)

    #15439
    Chris
    Keymaster

    No, even if it was possible, calling wp_footer() won’t work.

    MapPress wasn’t designed to display the maps in anything but a blog page, so I don’t think there’s a solution using the current version.

    However – I’d like to take a look to see if the plugin can be modified to work in the scroller. Could you send me a link your blog, and tell me which infinite scroll plugin you’re using?

    Please use the contact form so I can email you directly. I’ll post any updates here.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.