WordPress.org

Ready to get started?Download WordPress

Forums

Arconix Shortcodes
[Plugin: Arconix Shortcode Collection] Problem embedding Google Maps in tabs (9 posts)

  1. David Veldt
    Member
    Posted 2 years ago #

    I've come across a problem using the tabs. On several pages, I have 3 tabs that each contain a map. The map that displays on the first tab by default displays fine on page load, but the other two maps center themselves at top left when you click on the tabs. You can see what I'm talking about on http://www.endurotrader.com/tracks/alabama/

    I've looked around and this is a well-known issue with Google Maps, as it thinks it has zero size when loaded in a hidden div or iframe which is why it cetners at top left.

    I've found several proposed solutions, but my coding skills are nothing to write home about and I'm having a very difficult time modifying the plugin to make them display properly.

    Any help would be greatly appreciated.

    http://wordpress.org/extend/plugins/arconix-shortcodes/

  2. John Gardner
    Member
    Plugin Author

    Posted 2 years ago #

    Hi David,

    Thanks for using my plugin. When you say the map centers in the top left, is that top left of the entire page itself? Oddly enough when I view that link in Chrome 24, FF 18 or IE9, I get the behavior I would expect to get, which is that each map loads and stays properly in its tab container as I cycle through each tab.

  3. David Veldt
    Member
    Posted 2 years ago #

    Hi John,

    Thanks for the quick response. Very strange, I'm also using Chrome 24 and FF 18 and the 2nd & 3rd tabs shift the maps when I look at them.

    The maps all load and stay within the tab container; what I mean is that the 2nd & 3rd embedded maps - which should all be centered on Alabama (or Montgomery, AL pretty much in the center of the map), instead shift the center point so that Montgomery, AL is in the top left corner of the map iframe.

    All 3 maps should show the exact same view of Alabama; cycling between the tabs shouldn't appear to move the map at all.

  4. John Gardner
    Member
    Plugin Author

    Posted 2 years ago #

    Ah, now I understand. I didn't realize the map shifting until you pointed it out. I'll certainly look into it. Where did you find the proposed solutions?

  5. David Veldt
    Member
    Posted 2 years ago #

    I pretty much just searched "WordPress google maps hidden div" or "google maps hidden div" in Google. Here's a few of the threads I looked through:

    It seems the solutions depend on whether you are using the Google Maps API or an iframe, like I am, which only messes me up more.

    There's a ton more like them. You'll probably see my initial plea for help in Stackoverflow :/

  6. John Gardner
    Member
    Plugin Author

    Posted 2 years ago #

    Well, at least it gives me something to start with.

  7. David Veldt
    Member
    Posted 2 years ago #

    Thanks for taking a look, I really appreciate it.

  8. David Veldt
    Member
    Posted 2 years ago #

    Any luck with this?

  9. John Gardner
    Member
    Plugin Author

    Posted 2 years ago #

    Not yet... I've tried a few solutions that haven't been particularly fruitful, however I did stumble upon 1 solution that looks promising. I'll followup as soon as I've had an opportunity to test.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic