boolean success = false;
Bbox selectionBounds = new Bbox(0, 0, 0, 0);
for (Feature feature : features) {
// if the feature is selected union the bounding box
if (feature.isSelected()) {
selectionBounds = selectionBounds.union(feature.getGeometry().getBounds());
success = true;
}
}
// only zoom when their where really some items selected