[mapserver-users] Multiple LabelItems using Mapserver 5.2 and Openlayers
Karl Suiter
karl.suiter at gmail.com
Fri Oct 31 09:05:57 PDT 2008
Hello All,
I'm using Mapserver 5.2 and Openlayers 2.6 as my map interface. When
called using Openlayers, Mapserver renders two LabelItems when the layer to
be labels is of type "polygon". I've sort of fixed this issue by including
PROCESSING "LABEL_NO_CLIP=1" in the Layer definition.
So, for the most part, it works OK. But on some generated maps, I still
see one Layer that still renders two Labels.
I then noticed that if I tweaked the OpenLayers "minScale" value when
defining a new map (see below), I could get suppression of the second label.
var map = new OpenLayers.Map( 'map', {controls: [], maxExtent: bounds,
restrictedExtent: bounds, projection:"none", minScale: 10000, units: "m" }
); // change the minScale to 15 to suppress the 2nd label
I would like to remove the minScale variable from the Openlayers map
definition, but that pesky second LabelItem keeps coming back.
Has anyone seen/fixed this problem? Should I create a bug ticket. FYI -
I am cross-posting to the OpenLayers listserve to see if anyone there has
experienced this problem.
Here is my Layer definition I've been working with:
LAYER
NAME CR01
STATUS OFF
DATA cr.shp
TYPE POLYGON
CLASSITEM "FIPS_ADMIN"
LABELITEM "ADMIN_NAME"
PROCESSING "LABEL_NO_CLIP=1"
CLASS
NAME "FIPS_ADMIN"
EXPRESSION "CR01"
COLOR 226 166 166 # E2A6A6
OUTLINECOLOR 32 32 32
LABEL
COLOR 0 0 0
TYPE TRUETYPE
FONT verdana
SIZE 10
ANTIALIAS TRUE
POSITION AUTO
PARTIALS FALSE
MINDISTANCE 300
BUFFER 4
END # end of label
END
END
Thanks!
Karl Suiter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20081031/abaad0de/attachment.htm>
More information about the MapServer-users
mailing list