Labels: minfeaturesize causes labels not to display?
Gregor Mosheh
gregor at HOSTGIS.COM
Thu Aug 9 18:23:26 PDT 2007
The documentation describes that "minfeaturesize auto" will cause a
feature's label to be drawn only if it can fit within the polygon, and
we have turned it on for this polygon layer. These screenshots show that
the labelling behavior is now inconsistent.
In these, there is obviously plenty of room for labels, but it chooses
not to label.
http://maps.hostgis.com/gregor/ticket261a.jpg
http://maps.hostgis.com/gregor/ticket261c.jpg
It shows up if we zoom in a bit:
http://maps.hostgis.com/gregor/ticket261b.jpg
Using PHP/Mapscript, the label-related code is as follows:
$maplayer->set('labelitem',$labelitem);
$class->label->color->setRGB(0,0,0);
$class->label->outlinecolor->setRGB(200,200,200);
$class->label->set('position',MS_CC);
$class->label->set('angle',0);
$class->label->set('size',7);
$class->label->set('type',MS_TRUETYPE);
$class->label->set('font','Vera');
$class->label->set('mindistance',1);
$class->label->set('buffer',1);
$class->label->set('partials',MS_TRUE);
$class->label->set('minfeaturesize',MS_AUTO);
$class->label->set('autominfeaturesize',MS_TRUE);
Any thoughts? Basically, we want as many labels as possible without
collisions, but with each label constrained to its polygon.
--
Gregor Mosheh / Greg Allensworth
System Administrator, HostGIS cartographic development & hosting services
http://www.HostGIS.com/
"Remember that no one cares if you can back up,
only if you can restore." - AMANDA
More information about the MapServer-users
mailing list