[mapserver-users] Annotation Layer Always on Top Despite Not Being Declared Last

Donald Kerr donald.kerr at dkerr.co.uk
Mon Nov 22 14:08:26 EST 2010


Steve,

Thanks for your advice ... obvious now that you point it out to me!

The problem was that the annotation layer did not have "LABELCACHE" set so
it defaulted to "ON". I have now added "LABELCACHE OFF" and the labels on
that layer are drawn first before the labels and icons on the layers that
are rendered after that. There is no issue with label positioning on this
layer as the angle, size and anchor position of the labels are set from
information in a database and therefore there is no label clashing.

Many thanks.

Regards,

Donald


-----Original Message-----
From: Lime, Steve D (DNR) [mailto:Steve.Lime at state.mn.us] 
Sent: 22 November 2010 16:46
To: Donald Kerr; mapserver-users at lists.osgeo.org
Subject: RE: [mapserver-users] Annotation Layer Always on Top Despite Not
Being Declared Last


Annotation layers basically just add labels to the label cache and labels
are drawn after everything else. If you want labels drawn before other
features then you can try the "LABELCACHE OFF" layer parameter. Note this
by-passes any label overlap checking.

You can control the order of label drawing by 1) the order of layers in the
mapfile (last labels into the cache are drawn first) or 2) through the use
of the label PRIORITY parameter. 

Typically annotation layers are defined very late in a mapfile...

Steve

-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Donald Kerr
Sent: Saturday, November 20, 2010 12:31 PM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] Annotation Layer Always on Top Despite Not Being
Declared Last

Hi List,

I have a map file made up from multiple layers one of which is an Annotation
layer. I have a number of layers declared after that layer but the
annotation layer always appears to show on top.  I want the layers that are
declared later in the map file to show on top. I can't see anything that
could be causing this and would appreciated it if someone could advise.

See attached image where the text "McL" part of "McLellan Galleries" shows
through the label. The text from this Annotation layer also shows through
png symbols declared in other layers so it is not just labels where the
underlying text appears on top.

Many thanks.

Regards,

Donald Kerr



More information about the mapserver-users mailing list