[mapserver-users] multiple styles in a class

Mukesh Subedee msubedee at yahoo.com
Wed Apr 27 13:50:16 PDT 2011


I wanted to minimize the number of classes within a layer and found a statement 
in MapServer/Style documentation that we can have multiple styles within a class 
but was wondering if they could be used for styling (coloring) different 
attributes of a type (as in PIG example).

Mukesh 



________________________________
From: "Fawcett, David (MPCA)" <david.fawcett at state.mn.us>
To: Mukesh Subedee <msubedee at yahoo.com>; mapserver mailing list 
<mapserver-users at lists.osgeo.org>
Sent: Wednesday, April 27, 2011 13:42:58
Subject: RE: [mapserver-users] multiple layers in a class


No.  That is what classes are for.
 
What is your concern about using multiple classes?
 
From:Mukesh Subedee [mailto:msubedee at yahoo.com] 
Sent: Wednesday, April 27, 2011 3:41 PM
To: Fawcett, David (MPCA); mapserver mailing list
Subject: Re: [mapserver-users] multiple layers in a class
 
Oops, my bad...I meant multiple styles within a class. Does that mean I cannot 
use different color scheme for symbolizing "SMALL PIG" and "BIG PIG" within a 
same class? Is there any way to categorize each PIG with different EXPRESSION 
and give different STYLE for each within a class?
 
Mukesh
 

________________________________

From:"Fawcett, David (MPCA)" <david.fawcett at state.mn.us>
To: Mukesh Subedee <msubedee at yahoo.com>; mapserver mailing list 
<mapserver-users at lists.osgeo.org>
Sent: Wednesday, April 27, 2011 12:35:44
Subject: RE: [mapserver-users] multiple layers in a class
Mukesh, 
 
If you want to symbolize SMALL PIG and BIG PIG differently, you will need two 
classes.  A class is used to select features that match the (optional) class 
expression.  

 
You can have multiple styles within a class, but they would be applied equally 
to all of the features in that class.  One example might be stacking symbols for 
a feature.  

 
The docs don’t say that you can have multiple ‘layers’ within a class, but that 
you can have multiple ‘styles’ applied within a class.  
http://mapserver.org/mapfile/style.html
 
In your description below, you are conceptually talking about having different 
classes within a layer, but just using different words.  Is there a reason that 
you have an aversion to using multiple classes?  

 
You can group classes if there is a need for it.  
http://mapserver.org/mapfile/class.html
 
David.
 
From:mapserver-users-bounces at lists.osgeo.org 
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Mukesh Subedee
Sent: Wednesday, April 27, 2011 2:06 PM
To: mapserver mailing list
Subject: [mapserver-users] multiple layers in a class
 
Hi, 
 
In the STYLE documentation, it is mentioned that it is possible to have multiple 
layers within a class. I could not find any example how it can be implemented. I 
was checking an example 
in http://lists.osgeo.org/pipermail/mapserver-users/2010-August/066303.html where
 "SMALL PIG" and "BIG PIG" are in two different classes. However I am wondering 
if it is possible to implement it within a same class but representing with 
different styles. It means representing two different "PIG" in a same class but 
with different coloring mechanisms. 
 
Thanks,
Mukesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110427/e06686be/attachment.htm>


More information about the MapServer-users mailing list