<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi all.<br>
<br>
I'm new to the list and a relative newbie to MapServer.<br>
<br>
I'm having trouble with label priority... I have 3 layers - city, town,
populated place and the populated place labels always render in
preference to towns and cities, but I want city labels to always render
with a higher priority. That is, if MapServer has to decide whether to
render a pp label or a city label when they are in the same place I
want the city one to be rendered.<br>
<br>
All I can find on this subject is an email from Stephen Lime in 2001
that said this:<br>
"Labels are placed into the cache as layers are processed- they have to
be, and then the<br>
cache is processed in reverse order so that features in the last layer
drawn (i.e. the top layer) <br>
are labeled first. I've not had problems with it."<br>
<br>
However, changing the order of layers in the mapfile doesn't fix it.
I'm using WMS to access it, if that makes any difference. Here is what
was said on IRC this morning:<br>
<br>
&lt;bitnerd&gt; mrp: try playing with labelcache and postlabelcache in
your layer definition you can do a lot to tweak labeling behaviours
with those<br>
&lt;bitnerd&gt;
<a class="moz-txt-link-freetext"
 href="http://mapserver.gis.umn.edu/docs/reference/mapfile/layer">http://mapserver.gis.umn.edu/docs/reference/mapfile/layer</a><br>
&lt;mrp&gt; Thanks bitnerd. I have tried these, <b>but I really want
the label cache to work as normal so that I don't get overlaps and
clutter.</b> The labels can be quite high density. I just need to be
able to prioritise the order they are rendered, but the order in the
mapfile doesn't seem to help<br>
&lt;FrankW&gt; mrp: Did you change the order of your layers in the .map
file or in the WMS request?<br>
&lt;FrankW&gt; I'm not sure, but the order of layers in the WMS request
may be significant.<br>
&lt;mrp&gt; I am using uDig to access the WMS. Changing the order in
.map and uDig don't seem to make a difference<br>
&lt;FrankW&gt; If you can see the apache log file, check the order of
layers in the action wms and see if they vary.<br>
&lt;mrp&gt; ok, I'll have a look now<br>
&lt;mrp&gt;
LAYERS=land,nmcregion,exotic,forest,lake,native,railway,river,riverbed,road,rsrp,town,populatedplace,city<br>
&lt;mrp&gt;
LAYERS=land,nmcregion,exotic,forest,lake,native,railway,river,riverbed,road,rsrp,town,city,populatedplace<br>
&lt;mrp&gt; That's the WMS requests... the order of city and pp makes
no difference<br>
&lt;FrankW&gt; Hmm, I'm out of ideas.<br>
&lt;mrp&gt; they are currently ordered in the mapfile (top to bottom)
as city, town, pp. Changing that order around seems to make no
difference<br>
<br>
I just need to know what things I can try or look out for (and what the
expected behaviour is).<br>
<br>
<br>
This is with all 3 layers turned on but with "POSTLABELCACHE true" set
on the city and town layers:<br>
[Damn, the mailing list email size limit is too small for a single
screenshot!!! That's not so good is it??]<br>
<br>
I would expect that because city is at the top of the list the labels
would be rendered in the same order of priority.<br>
<br>
Thanks,<br>
Mark<br>
<br>
<br>
</body>
<br />-- 
<br />This message has been scanned for viruses and dangerous
<br />content by <a href="http://www.mailscanner.info/"><b>MailScanner</b></a>, and is believed to be clean.
</html>