PanMapEvent panMapEvent = new PanMapEvent(this, mapDetail.getId());
panMapEvent.setToLocation(berlinLocation);
eventDispatcher.fireMapEvent(panMapEvent);
ZoomMapEvent zoomMapEvent = new ZoomMapEvent(this, mapDetail.getId(), ZoomMapEvent.ZOOM_TO_LEVEL);
zoomMapEvent.setZoomLevel(berlinZoomLevel);
zoomMapEvent.setTransformationCenterLocation(berlinLocation);
eventDispatcher.fireMapEvent(zoomMapEvent);
// TODO Create convenience methods to fire map events.
// MapUtils.fireZoomEvent(eventDispatcher, mapDetail, ZoomMapEvent.ZOOM_TO_LEVEL, berlinZoomLevel);
// MapUtils.firePanEvent(eventDispatcher, mapDetail, berlinLocation);
} else if (mouseX > 610 && mouseX < 790 && mouseY > 310 && mouseY < 390) {
PanMapEvent panMapEvent = new PanMapEvent(this, mapDetail.getId());
panMapEvent.setToLocation(universityLocation);
eventDispatcher.fireMapEvent(panMapEvent);
ZoomMapEvent zoomMapEvent = new ZoomMapEvent(this, mapDetail.getId(), ZoomMapEvent.ZOOM_TO_LEVEL);
zoomMapEvent.setZoomLevel(universityZoomLevel);
zoomMapEvent.setTransformationCenterLocation(universityLocation);
eventDispatcher.fireMapEvent(zoomMapEvent);
}
}