[Mapserver-users] Scaling TrueType Labels
Steve Lime
steve.lime at dnr.state.mn.us
Fri May 2 11:10:12 PDT 2003
You need to set a SYMBOLSCALE value. That is, the value at which symbols
or fonts are
their default size.
>>> "Tom Melhuish" <tmelhuish at webinsightsinc.com> 05/02/03 10:42AM >>>
Hi,
I can't seemed to be able to scale labels up and down as the map zoom
in and
out. It always remains the same as initial size. When I load the
mapfile, it
doesn't returns any errors. The TRUETYPE font are installed correctly
because they follow my street centerline data fine. I thought that all
it
requires is to set LABEL's TYPE to TRUETYPE, and specifying MINSIZE
and
MAXSIZE....am I missing something?
I'm using Mapserver 3.6.4 with Postgres on Redhat 8.0.
Here are some scenario's I tried and the results:
SIZE 12
MINSIZE 8 Result => font is 12 pixels at any zoom
size
MAXSIZE 18
#SIZE 12
MINSIZE 8 Result => font is 8 pixels at any zoom
size
MAXSIZE 18
#SIZE 12
MINSIZE 18 Result => font is 8 pixels at any zoom size
MAXSIZE 8
SIZE 12
MINSIZE 18 Result => font is 8 pixels at any zoom size
MAXSIZE 8
This is what a portion of my mapfile look like:
MAP
#
# Start of map file
#
NAME "MSapplet"
STATUS ON
EXTENT 2190000 640000 2200000 650000 # JC extents
SIZE 600 600
SHAPEPATH "data"
FONTSET "fonts/font.list"
IMAGECOLOR 255 255 255
UNITS FEET
SCALE 24000
# you may need to change this to match your MapServer build
IMAGETYPE PNG
LAYER
NAME "streets"
GROUP "gp_streets"
STATUS ON
# Get the lines from the 'the_geom' column of the 'jcctrline'
table
DATA "the_geom from jcctrline"
TYPE LINE
CONNECTIONTYPE postgis
# Connect to a remote spatial database
CONNECTION "user=gisusr password=gisusr dbname=gisdb
host=localhost
port=5432"
MAXSCALE 30000
MINSCALE 30
LABELMAXSCALE 30000
LABELMINSCALE 1000
LABELITEM "name"
TEMPLATE "ttt.html"
CLASS
# EXPRESSION /./
NAME "streets"
COLOR 75 75 75
LABEL
TYPE TRUETYPE
FONT "times_regular"
SIZE 12
MINSIZE 8
MAXSIZE 18
POSITION CC
ANGLE AUTO
BUFFER 2
MINDISTANCE 200
MINFEATURESIZE AUTO
COLOR 0 0 0
ANTIALIAS true
END
END
END # streets Layer
END
Thanks for your help,
_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list