Make new Google Maps load properly on hidden tab?
This is a request for a mod for the new Google maps (API v3.0) in ClassiPress 3.1.
In the previous version on ClassiPress with the older version of Google maps, we were able to swap the contact and map tabs so the contact tab would show up first. The map tab had some glitches, but there were ways to make it display properly. In this new version the map definitely does not like to be loaded on a hidden tab and will not display properly. This is a known Google Maps display issue when trying to load the map on a hidden element.
There are many threads on the web on how to patch this to work, the question is, are there any ClassiPress/WordPress experts that may have a solution for this particular application. If we could somehow trigger a map 'refresh' when the tab is clicked, everything would work fine:
Code:
google.maps.event.trigger(map, 'resize');
Question is, how can we trigger this when you click the tab?