// Search whether an other layer has yet defined some bounding box.
// If none, we'll zoom to the bounding box of the layer with the photos.
boolean boundingBoxedLayerFound = false;
for (Layer l: Main.map.mapView.getAllLayers()) {
if (l != yLayer) {
BoundingXYVisitor bbox = new BoundingXYVisitor();
l.visitBoundingBox(bbox);
if (bbox.getBounds() != null) {
boundingBoxedLayerFound = true;
break;
}
}
}
if (! boundingBoxedLayerFound) {
BoundingXYVisitor bbox = new BoundingXYVisitor();
yLayer.visitBoundingBox(bbox);
Main.map.mapView.recalculateCenterScale(bbox);
}
for (ImageEntry ie : yLayer.data) {