Next Previous Contents

2. MapHandler

The MapHandler is the central component that lets you manage and connect OpenMap components is a very flexible manner. The MapHandler can be thought of as a conceptual map, which can contain the MapBean and other components that manage the layers, mouse events, and projection controls.

The MapHandler is really an extended version of Java's BeanContext. The BeanContext is a mechanism that Java Beans can use to find other beans that they can interact with. The extensions that the MapHandler provides is a behavior that handles multiple cases of a SoloMapComponent objects. A MapHandler can only have one instance of any SoloMapComponent class, and can have a rejection or replacement policy for actions to take when a duplicate SoloMapComponent class is added to the MapHandler. As an example, the MapBean is a SoloMapComponent - the MapHandler can only use one MapBean at a time. If your application needs more than one MapBean, use the same number of MapHandlers, with the corresponding number of needed SoloMapComponents.

All OpenMap components have been designed to use the MapHandler to locate and connect to other components they need. Other components that either extend the MapHandlerChild class or implement it's methods can easily be integrated into the OpenMap application framework.


Next Previous Contents