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.
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.
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.
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?
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 :/
Well, at least it gives me something to start with.
- The topic ‘[Plugin: Arconix Shortcode Collection] Problem embedding Google Maps in tabs’ is closed to new replies.