I have tried to do this in many different ways but the most obvious was this:
var map2 = new GMap2(document.getElementById("map2"), {size:"100%"});
That does not work.
I have tried to do this in many different ways but the most obvious was this:
var map2 = new GMap2(document.getElementById("map2"), {size:"100%"});
That does not work.
Unless you specify a size explicitly for the map using GMapOptions in the constructor, the map implicitly uses the size of the container to size itself.
So set the size of your map container fill all available space:
<div id="map2" style="width: 100%; height: 100%"></div>
How about dynamically calculating the dimensions of it's parent container and explicitly setting them on the google map element? Assuming 100%/100% height don't work out.