Perforce JViews Maps Sample: Labeling a Map
Description
This sample shows how to label a map.
How to Use the Sample
- Zoom and pan the map using the toolbar zoom and pan interactors to see how labels are displayed on the map. Labels are displayed if there is enough room for them.
-
Toggle labeling.
- Select the Shape Layer in the Maps Layers tab.
- Edit the Labeling property in the property sheet, No Labeling turns labeling off.
-
Change the labeling attributes:
- Expand the Labels layer in the Map Layers tab.
- Select a label sublayer
- Change the Draw Outline, the Fill Color, the Font or the Outline Color in the property sheet to see the corresponding changes in the map.
How to Run the Sample as an Application
This sample can
be run as an application.
The installation directory contains
an executable JAR file,
label.jar
,
that allows you to execute the sample with a double click from a
file browser. Note that if you are using Internet Explorer, you can
open the installation directory
and execute the JAR file from the browser. This
technique may not work in other Web browsers.
Alternatively, you
can run the sample application from the command line.
First check that the Ant utility is properly configured. If not, see the
instructions on how to configure Ant for Perforce JViews.
Then, go to the installation directory
of the sample and type:
ant run
Topics Covered
- Labeling.
Detailed Description
This sample shows how to label a map.
Installation Directory
The Labeling a Map sample is installed here.
Classes Involved
- ilog.views.maps.label.IlvMapLabeler
- ilog.views.maps.label.IlvMapDefaultLabeler
- ilog.views.maps.label.IlvMapLabelManager