Google maps not working when placed inside jQuery tabs is a question that\'s all over the web. In my research so far none of the solutions seem to work. Hopefully someone he
I abandoned the plugins and went with the google maps shortcode that has been released for the theme I'm using. While I lose the custom markers functionality, the theme developers were finally able to help get this all working. They added the following code to the shortcode PHP file.
jQuery('ul.tabs_framed').data('tabs').onClick(function(e,index) {
resizeMap(" . 'map'.$map_id .")
});
function resizeMap(m) {
x = m.getZoom();
c = m.getCenter();
google.maps.event.trigger(m, 'resize');
m.setZoom(x);
m.setCenter(c);
};
This code triggers a map reload when the tab containing the map is clicked. It also recenters the map. This solution solved the problem for me and the google maps now display in the jquery tabs. Hopefully some of the more javascript-savvy users here (and plugin developers!!!) can adapt this solution to their own maps-in-tabs issues.