public void run() {
final Rectangle r = mainView.getBounds();
UITools.convertRectangleToAncestor(mainView.getParent(), r, mapView);
final boolean isEventPointVisible = mapView.getVisibleRect().contains(r);
if (!isEventPointVisible) {
mapView.scrollRectToVisible(r);
}
}
});
}
}