Perhaps you could use RULE - (Optional) Specify the name of the CLASS to generate the legend image for (as opposed to generating an icon and label for ALL classes for the layer). http://mapserver.org/ogc/wms_server.html
Perhaps you can put several rule in the WMS call I just realize that RULE is not included in the Mapserver CLASS doc For your second question, encoding is still a mystery I'm trying to understand.... "Rahkonen Jukka (Tike)" <[email protected]>@lists.osgeo.org Envoyé par : [email protected] 2014-04-10 02:13 A gorank <[email protected]>, "[email protected]" <[email protected]> cc Objet Re: [mapserver-users] Exclude one layer's class from GetLegendGraphics Hi, For the first question I am remembering that only classes with NAME go to the legend. I may be wrong but you can try it easily. -Jukka Rahkonen- gorank wrote: > > Actually i have to questions: > > 1). I have mapfile with few layers. In one layer I have 5 classes with expresions. > When show legend with GetLegendGraphics always all 5 classes are shown > although one class is empty (for instance class expression is ([2011] = 0) and in > the shapefile attributes there is no value 0). > > My question is how to exclude class from the legend. I tried with STATUS OFF in > the CLASS but do not work. > > 2). I use cyrilic font for polygon labels and for legend titles. When I put class title > with unicode and save mapfile as unicode, OpenLayers app show empty map in > the browser. When I put latin text and sava mapfile as ASCII the same map is > shown in the browser. What i am missing. > > Example from the mapfile. > CLASS > NAME "klasa_1" > EXPRESSION ([2011] > 0 and [2011] < 5) > LABEL > FONT "arial" > SIZE 8 > ENCODING "UTF-8" > OFFSET 0 0 > POSITION CC > SHADOWSIZE 1 1 > TYPE TRUETYPE > END # LABEL > STYLE > COLOR 255 255 128 > OUTLINECOLOR 130 130 130 > WIDTH 0.5 > END # STYLE > TITLE "4.9 or less" > END # CLASS > CLASS > NAME "klasa_2" > EXPRESSION ([2011] >= 5 and [2011] < 10) > LABEL > FONT "arial" > SIZE 8 > ENCODING "UTF-8" > OFFSET 0 0 > POSITION CC > SHADOWSIZE 1 1 > TYPE TRUETYPE > END # LABEL > STYLE > COLOR 250 209 85 > OUTLINECOLOR 130 130 130 > WIDTH 0.5 > END # STYLE > TITLE "5.0 - 9.9" > END # CLASS > CLASS > NAME "klasa_3" > EXPRESSION ([2011] >=10 and [2011] < 15) > LABEL > FONT "arial" > SIZE 8 > ENCODING "UTF-8" > OFFSET 0 0 > POSITION CC > SHADOWSIZE 1 1 > TYPE TRUETYPE > END # LABEL > STYLE > COLOR 242 167 46 > OUTLINECOLOR 130 130 130 > WIDTH 0.5 > END # STYLE > TITLE "10.0 - 14.9" > END # CLASS > CLASS > NAME "klasa_4" > EXPRESSION ([2011] >= 15 and [2011] < 20) > LABEL > FONT "arial" > SIZE 8 > ENCODING "UTF-8" > OFFSET 0 0 > POSITION CC > SHADOWSIZE 1 1 > TYPE TRUETYPE > END # LABEL > STYLE > COLOR 173 83 19 > OUTLINECOLOR 130 130 130 > WIDTH 0.5 > END # STYLE > TITLE "15.0 - 19.9" > END # CLASS > CLASS > NAME "klasa_5" > EXPRESSION ([2011] >= 20 and [2011] < 10000) > LABEL > FONT "arial" > SIZE 8 > ENCODING "UTF-8" > OFFSET 0 0 > POSITION CC > SHADOWSIZE 1 1 > TYPE TRUETYPE > END # LABEL > STYLE > COLOR 107 0 0 > OUTLINECOLOR 130 130 130 > WIDTH 0.5 > END # STYLE > TITLE "20 and more" > END # CLASS > CLASS > STATUS ON > NAME "klasa_0" > EXPRESSION ([2011] = 100000) > LABEL > FONT "arial" > SIZE 8 > ENCODING "UTF-8" > OFFSET 0 0 > POSITION CC > SHADOWSIZE 1 1 > TYPE TRUETYPE > END # LABEL > STYLE > COLOR 100 100 100 > OUTLINECOLOR 130 130 130 > WIDTH 0.5 > END # STYLE > TITLE "no event" > END # CLASS > CLASS > STATUS OFF > NAME "klasa_00" > EXPRESSION ([2011] = 10000) > LABEL > FONT "arial" > SIZE 8 > ENCODING "UTF-8" > OFFSET 0 0 > POSITION CC > SHADOWSIZE 1 1 > TYPE TRUETYPE > END # LABEL > STYLE > COLOR 200 200 200 > OUTLINECOLOR 130 130 130 > WIDTH 0.5 > END # STYLE > TITLE "no event1" > END # CLASS > > > > -- > View this message in context: http://osgeo-org.1560.x6.nabble.com/Exclude- > one-layer-s-class-from-GetLegendGraphics-tp5134193.html > Sent from the Mapserver - User mailing list archive at Nabble.com. > _______________________________________________ > mapserver-users mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
