Google MAP API v3: Center & Zoom on displayed markers
// map: an instance of GMap3
// latlng: an array of instances of GLatLng
var mapBounds = new google.maps.LatLngBounds();
latlng.each(function(n) {
mapBounds.extend(n);
return;
});
map.setCenter(mapBounds.getCenter());
map.fitBounds(mapBounds);