synchronized(Main.class) {
Iterator<WeakReference<ProjectionChangeListener>> it = listeners.iterator();
while (it.hasNext()){
WeakReference<ProjectionChangeListener> wr = it.next();
ProjectionChangeListener listener = wr.get();
if (listener == null) {
it.remove();
continue;
}
listener.projectionChanged(oldValue, newValue);
}
}
if (newValue != null && oldBounds != null) {
Main.map.mapView.zoomTo(oldBounds);
}