[Mapserver-users] ms_newclassObj

robert fritz robert-fritz at web.de
Wed Feb 18 02:38:19 PST 2004


Hello,

 

In my map file I have defined a layer with 1 class. I add a new class using mapscript and set an expression for this new layer. As a result I get a new entry in my legend, but the shape of the new class is not drawn. The expression is correct!
 
If I define an empty second class (class end) in my map file and set the expression (the same as above) and the style for this class using mapscript  I get what I want – the shape is drawn.

I want to create the class with mapscript and I do not want to use a predefined emtpy class in the map file. What do I do wrong?

Mapserver 4.0
 
Thank you.

                       $layerO->set(classitem,$qitem);
                        $classO = ms_newclassobj($layerO);            // this does not work
                        //$classO=$layerO->getclass(0);                // this works, 
                        $classO->set(name,"TEST_OM");
                        $styleO = ms_newStyleObj($classO);
                        $styleO->color->setRGB(255,255,0);
                        $styleO->outlinecolor->setRGB(0,0,0);

                        //$styleO->set(symbolname,"dashed1");
                        $query=$msom_value;
                        echo($query);

                         $classO->setExpression("\"$query\"");
______________________________________________________________________________
... and the winner is... WEB.DE FreeMail! - Deutschlands beste E-Mail
ist zum 39. Mal Testsieger (PC Praxis 03/04) http://f.web.de/?mc=021191





More information about the MapServer-users mailing list