[mapserver-users] single CLASS object to label all polygons?

Stepan Kafka stepan.kafka at centrum.cz
Thu Apr 18 07:13:52 EDT 2002


THe simplest solution is putting the layer twice into the mapfile. The first
one with your color coding, the second one for labeling (it may be
annotation type with one class). You can switch them ON/OFF together with
using the same GROUP name for both.

Stepan Kafka

> -----Pùvodní zpráva-----
> Od: owner-mapserver-users at lists.gis.umn.edu
> [mailto:owner-mapserver-users at lists.gis.umn.edu]za uživatele Stephen
> Woodbridge
> Odesláno: 18. dubna 2002 3:03
> Komu: Dylan Keon
> Kopie: mapserver-users at lists.gis.umn.edu
> Pøedmìt: Re: [mapserver-users] single CLASS object to label all
> polygons?
>
>
> Dylan,
>
> You need to use a separate LABEL in every CLASS. Here is why ...
>
> I think CLASS works like a SWITCH or CASE in that as soon a one class
> section is executed no more are looked at. So if you put your label at
> the bottom only the polygons that are not colored are labeled and if you
> put it at the top the they are all labeles but not colored. You will
> have to put the label block in every class section if you want them
> colored and labeled.
>
> -Steve
>
> Dylan Keon wrote:
> >
> > I have a polygon layer that I've classified using CLASSITEM and a set of
> > CLASS objects.  I also want to display labels for each polygon.
>  Do I need
> > to use a separate LABEL within each class object (I know this
> will work), or
> > is it possible to apply a single class object to label all polygons (I'm
> > having trouble getting this to work)?  I can successfully use
> an expression
> > to label all polygons from one class object, but if I put that
> class object
> > before the rest of the class objects, it disables the color rendering of
> > those polygons.  If I put it at the end of the other class objects, the
> > labels are hidden beneath the rendered colors.
> >
> > Thanks,
> > Dylan
>
>




More information about the mapserver-users mailing list