The MapViewer

The MapViewer.java class is part of the book sources.
The book resources include some images with bounding box files.
Or you can browse the directory with the MapViewer.jar.

Click on screenshot to get a larger image 

The GPXviewer combines these two packages to combine the components for global positioning, time keeping, and drawing of spatial data. Nevertheless the GPXviewer.jar is a stand alone application and has to launched from the command line.

The MapViewer.jar is very similar to the GPXviewer with a major difference in design. The ROAF developer wants to focus on the code for non visual development. Therefor the developer can exclude the roafx.gui package from his development environment and include the MapViewer.jar as an external and hidden helper tool.

The MapViewer can be added to an application as a member variable with the static method,

MapViewer gui = MapViewer.createAndShowGUI();

Attention!

The MapViewer is intended for programmatic use and should not terminate the rest of the application. If you launch the MapViewer.jar with a double click and then close the window the OS process is still running and may have to be killed. To avoid this you should launch the MapViewer in a dedicated console window.

 

Move to Next Menu point 'MovingObjects'

MovingObjects is the development environment for the ROs and even the

closing of the MapViewer should not affect other objects in the application.

For isolated map analysis, the MapViewer can always be launched with its

main method or as an executable jar.

In a team, the GUI developer can distribute a MapViewer.jar and the RO

developer can basically work against the MapPanel API and apply listeners

to talk to the environment, whenever the user interacts. The controlPanel

can be retrieved to add application-specific controls.