[Mapserver-users] Label background scaling problem
Havard Tveite
havard.tveite at ikf.nlh.no
Thu Jan 23 05:42:47 PST 2003
Mapserver 3.7, nightly 23. january.
(Solaris 2.5.1)
MapServer version 3.7 (development) OUTPUT=PNG OUTPUT=JPEG
OUTPUT=WBMP SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER
SUPPORTS=WMS_CLIENT SUPPORTS=GD2_RGB INPUT=EPPL7 INPUT=SDE
INPUT=POSTGIS INPUT=GDAL INPUT=SHAPEFILE
GDAL 1.1.8
GD 2.0.11
PostGIS 0.7.3
Freetype 2.1.2
I have tried to use labels with a background. I wanted to
scale both the (point) symbols and the labels (with
background) according to the scale of the map (different
scaling for the point symbols and the labels). The symbols
seem to scale OK, the labels seem to scale OK, but the
label background rectangles do not scale the same as the
label text (in my case, they scale "too much", so the
background rectangles become enormous compared to the
text when zooming in). If I set LABEL.MAXSIZE to the same
value as LABEL.MINSIZE and LABEL.SIZE, the text behaves
as expected, but the background box is not affected.
Am I doing something wrong?
(There might also be some problems with label placement
when scaling labels)
I have included some (relevant?) parts from my map-file
below.
********************************
OUTPUTFORMAT
NAME png24
DRIVER "GD/PNG"
IMAGEMODE RGBA
TRANSPARENT ON
END
********************************
The LAYER definition:
********************************
LAYER
NAME test
DATA test
STATUS DEFAULT
TYPE POINT
PROJECTION
"init=epsg:32633" #32633: UTM zone 33, WGS84
END
LABELITEM "testitem"
LABELMAXSCALE 500000
LABELMINSCALE 10000
MAXSCALE 100000000
MINSCALE 10000
SYMBOLSCALE 400000
CLASS
NAME "Test"
COLOR 255 0 255
SYMBOL "circle"
SIZE 5
MINSIZE 3
MAXSIZE 20
LABEL
COLOR 0 0 0
BACKGROUNDCOLOR 225 225 200
POSITION UR
FONT futura-bold
TYPE truetype
SIZE 10
MINSIZE 4
MAXSIZE 20
END
END # CLASS
END # LAYER
********************************
--
Håvard Tveite Phone: +47 64948857
Department of Mapping Sciences Fax: +47 64948856
Agricultural University of Norway
POBox 5034, N-1432 Ås, NORWAY http://www.nlh.no/ikf/
More information about the MapServer-users
mailing list