Support » Plugin: Arconix Shortcodes » [Plugin: Arconix Shortcode Collection] Problem embedding Google Maps in tabs

  • David Veldt

    (@davidveldt)


    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/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author John Gardner

    (@jgardner03)

    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.

    David Veldt

    (@davidveldt)

    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.

    Plugin Author John Gardner

    (@jgardner03)

    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?

    David Veldt

    (@davidveldt)

    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 :/

    Plugin Author John Gardner

    (@jgardner03)

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

    David Veldt

    (@davidveldt)

    Thanks for taking a look, I really appreciate it.

    David Veldt

    (@davidveldt)

    Any luck with this?

    Plugin Author John Gardner

    (@jgardner03)

    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.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: Arconix Shortcode Collection] Problem embedding Google Maps in tabs’ is closed to new replies.