Changing Style of Symbols on the fly
    Marcelo Carrillo 
    marcelito20 at GMAIL.COM
       
    Tue Apr  3 16:45:12 PDT 2007
    
    
  
Hi guys,
I am requesting any help changing the style of symbols in a dynamic layer.
Im using MapScript on Csharp, heres a sample of my test code. Im trying that
even points uses one style and odd ones uses another. Mapserver presents all
points with just one of the styles... Is there any other way how I can do
what I'm trying??
                    foreach (pointObj point in RealPathPoints)
                    {
                        if (point != null)
                        {
                            LineNodos.add(point);
                            double x = point.x;
                            double y = point.y;
                               styleObj styleNodos = LayerNodos.getClass
(0).getStyle(0);
                                if (counter % 2 == 0)
                                {
                                    styleNodos.symbol = 19;
                                    styleNodos.symbolname = "on.gif";
                                    if (counter == RealPathPoints.Count)
                                    {
                                        point.draw(m_obj, LayerNodos, i_obj,
0, CarId);
                                    }
                                    else
                                    {
                                        point.draw(m_obj, LayerNodos, i_obj,
0, counter.ToString());
                                    }
                                }
                                else
                                {
                                    styleNodos.symbol = 18;
                                    styleNodos.symbolname = "off.gif";
                                    if (counter == RealPathPoints.Count)
                                    {
                                        point.draw(m_obj, LayerNodos, i_obj,
0, CarId);
                                    }
                                    else
                                    {
                                        point.draw(m_obj, LayerNodos, i_obj,
0, counter.ToString());
                                    }
                                }
                            point.setXY(x, y, 0);
                        }
                        counter++;
                    }
                    counter = 1;
                    ShapeNodos.add(LineNodos);
                    ShapeNodos.draw(m_obj, LayerNodos, i_obj);
                    LayerNodos.draw(m_obj, i_obj);
Any hel will be appreciated.
Best Regards,
Marcelo Carrillo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070403/0b04eb16/attachment.htm>
    
    
More information about the MapServer-users
mailing list