Polyline Termination

381
2
12-16-2011 12:48 PM
Labels (1)
GregEdwards
New Contributor
I have created more than one polyline, each being a distinct segment. Each lines is added separately to a single graphics layer. My code looks like the following:

                foreach (var line in polylineList)
                {
                    Graphic graphic = new Graphic { Symbol = defaultLineSymbol, Geometry = line };
                    graphicsLayer.Graphics.Add(graphic);
                }

When the map is rendered, all of the lines are connected together as if they were one single line.

Is there special code that needs to be added to ensure each segment is independent of one another? Maybe there a special line terminator that needs to be appled to each segment? 

How do I ensure each segment is independent of the others? Any assistance will be helpful.
Thank you.
-Greg Edwards
0 Kudos
2 Replies
JenniferNery
Esri Regular Contributor
Does your Graphic.Symbol have a select state? (See SelectLineSymbol in XAML-code) http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#SelectGraphics. You can use MouseLeftButtonDown to select graphic. If you have successfully added different graphics that make continuous line, during selection, only a segment of the line will be selected.
0 Kudos
GregEdwards
New Contributor
The issue I am seeing are in the lines themselves. I am trying to render distinct lines, but instead I am seeing a single line. Are there start and end points that need to be assigned to every line segment?
0 Kudos