There is a function you can use on a map, in which you give it a set of LatLngBounds and do this:
map.setCenter(bounds.getCenter(), map.getBoundsZoomLevel(bounds));
Where map is the map in question, and bounds are the latlng bounds variable. Then in order to add points or polygons to it you can run these functions...
bounds.union(latLngBounds) for other bounds (these can be extracted from polygons using the .getLatLngBounds() function) and bounds.extend(latLng) for individual points