Programming with JViews Maps > Creating a Map Application Using the API > Using the GUI Beans > Map Overview

The Map Overview Bean is represented by the IlvJOverview class. The Map Overview Bean displays a representation of a target manager view and enables users to navigate to an area of the view that is of particular interest.

An example of the Map Overview panel is shown in Figure 3.2.

overviewwin.png

Figure 3.2 Overview Panel

Including the Bean in an Application

To include the Map Overview Bean in your application, write the following lines of code:

IlvJOverview overview = new IlvJOverview();
overview.setView(view);

Adding the Bean to a Swing Component

Then add it into a swing component:

panel.add(overview, BorderLayout.CENTER);

You should also make sure that the size of your overview remains the same regardless of any Swing layout constraints applied. To do this, use lines such as the following:

overview.setSize(200, 100);
overview.setPreferredSize(overview.getSize());
overview.setMinimumSize(overview.getSize());

Customizing Interactions and Capabilities

You can customize the way users interact with the overview, and with the capabilities of the control rectangle as follows:

overview.setDrawingStyle(IlvManagerMagViewInteractor.Wire);
overview.setLineWidth(3);
overview.setResizeHandleSize(6);
overview.setResizingAllowed(true);
overview.setAutoTranslating(true);
overview.setAutoZooming(true);
overview.getOverviewView().setRepaintSkipThreshold(500);