There exists a thing called a bounds}} which is a container described by two lat/lng. A bounds object can be extended with the {{{extend method (it takes a latlng). Once the bounds are the desired extent, the current map can be zoomed to fit the bounds with:

   map.setZoom(map.getBoundsZoomLevel(bounds));


and then centered:

   map.setCenter(bounds.getCenter());