Calculate zoom level based on bounding box

Use OpenLayers to determine the best zoom level for the map based on the desired bounding
box but use some upper and lower bounds to prevent too much or too little.