The "single-tile" condition is generally caused by initializing a Google map on a hidden canvas, which appears to be the case here.
If the map is to be initially hidden and you don't want to resize, then your two main options are :
initialise on a visible canvas then immediately hide it - and hope that the map doesn't flash-display.
initialize the map on first display. I do this in one of my applications and find the delay not at all unacceptable, despite some heavyweight layering.
I suppose you might also consider the following possibility, though I've never tried it :
- initialize the map on a "visible" off-screen canvas, then reposition it on-screen at first view. Thereafter the canvas may be conventionally hidden/shown.
Edit
Yes, a map can be initialized off-screen then moved on-screen.
HTML:
<div id="off_screen">
<div class="googleMapContainer" id="map-canvas"></div>
</div>
...
<div class="tab">
<h3>Headline 3</h3>
<div id="map-placeholder"></div>
</div>
CSS:
#off_screen {
position: absolute;
left: -1000px;
top: -1000px;
}
Javascript:
var $mapCanvas = $("#map-canvas");
map = new google.maps.Map($mapCanvas.get(0), myOptions);
var listenerHandle = google.maps.event.addListener(map, 'idle', function() {
$mapCanvas.appendTo($("#map-placeholder"));
google.maps.event.removeListener(listenerHandle);
});
See updated fiddle