My suggestion for google maps api v3 would be(don't think it can be done more effeciently):
gmap : {
fitBounds: function(bounds, mapId)
{
//incoming: bounds - bounds object/array; mapid - map id if it was initialized in global variable before "var maps = [];"
if (bounds==null) return false;
maps[mapId].fitBounds(bounds);
}
}
In the result u will fit all points in bounds in your map window.
Example works perfectly and u freely can check it here www.zemelapis.lt