| Programming with JViews Maps > Creating a Map Application Using the API > Using the GUI Beans > Compass |
Compass |
INDEX
PREVIOUS
NEXT
|
The Compass Bean is represented by the IlvJCompass class. This Bean displays a compass indicating the geographic or cartographic north of the map.
An example of the Compass is shown in Figure 3.20.
To include the Compass Bean in your application, write the following lines of code:
IlvJCompass compass = new IlvJCompass(); compass.setView(view);
The Compass Bean then listens to view transformation changes, and check the rotation value to display north direction.
You can customize many parts displayed on the compass such as:
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. Legal terms. | PREVIOUS NEXT |