Dynamic point labeling
Paul G. Allen
pgallen at randomlogic.com
Tue Jul 25 23:21:18 PDT 2000
My application plots points on a map from data retrieved from a DB2
database. No problem here, I can plot points 'til my heart's content.
How do I label these points from data retreived from the same
database? The mapfile layer definitions from my current mapfile for
the points and labels are below. Note that the "DATA field" entry in
the LAYER definitions is now meaningless as I am no longer using this
to define the points and labels. I am still using MapServer v. 3.3.001
(or whatever the first MapScript version was :)
PGA
# FIELD UNITS (Dynamically plotted using Perl, MapScript,
and DB2)
LAYER
NAME field_units
TYPE POINT
STATUS ON
DATA field # Depricated for this application
TOLERANCE 4
CLASS
COLOR 255 0 0
SYMBOL 6
NAME "Field Units"
SIZE 4
MAXSIZE 7
END
QUERY
TEMPLATE units.html
END
END # Layer
# FIELD UNIT IDENTIFICATION
LAYER
NAME unit_names
TYPE ANNOTATION
STATUS OFF
DATA field # Depricated for this application
TOLERANCE 2
LABELITEM "id" # Depricated for this application
CLASS
SIZE 8
COLOR 3 0 128
SYMBOL 0
LABEL
BACKGROUNDCOLOR -1 -1 -1
COLOR 255 0 0
TYPE BITMAP
SIZE TINY
POSITION UC
WRAP " "
END # Label
END # Class
END # Layer
LAYER
NAME unit_names
TYPE ANNOTATION
STATUS OFF
DATA field # Depricated for this application
TOLERANCE 2
LABELITEM "msg_time" # Depricated for this application
CLASS
SIZE 8
COLOR 3 0 128
SYMBOL 0
LABEL
BACKGROUNDCOLOR -1 -1 -1
COLOR 255 0 0
TYPE BITMAP
SIZE TINY
POSITION LC
WRAP " "
END # Label
END # Class
END # Layer
END # Map File
More information about the MapServer-users
mailing list