I have 3 tabs and one tab is that of Google Maps. When not tabified I get the Map correctly, but when I tabify it, the map gets loaded, but not correctly sized and Grey area is more prominent. I tired to trigger the resize when the tab is clicked, but that also didnt help. I am using V3 of maps.
Share
When using tabs with the map in a tab that is not selected, the Google Maps API struggles with loading the map. Ideally it needs to be loaded with the viewport visible and at the correct size.
The way to do this with tabs is to load the map after the tab is selected (i.e. on the selected event of the tab). This also means you only need to load it if the tab is selected, with the downside being it isn’t instantly visible to the person browsing the page.