In the simplest case all user input only affects a single UnfoldingMap. For instance, a user clicks and drags the mouse, so that the map gets panned. In this case, the {@link MouseHandler}, a {@link MapEventBroadcaster}, reacts to the user's mouse-dragging, and creates a PanMapEvent with the respective geo-location to pan to. That event is fired, and send via the EventDispatcher to the only listener, the single map.
In other cases, applications can set up more sophisticated behaviors. For instance, in an overview+detail setting with a large detail map and a small overview map, the small map shall only show an overview but not be interactive itself. For this case, the MouseHandler is created for the large map, but with a scope of both maps. The EventDispatcher is initiated with both maps listening to pan-events. Thus, any panning on the large overview map also affects the small detail map.
See the OverviewAndDetailMapApp and the ComplexMapEventApp in the examples section for this.
Your application then can create EventDispatcher to connect broadcasters and listeners, and customize the event handling in an application.
|
|
|
|
|
|
|
|