Quantcast
Channel: Forums - ArcObjects SDKs
Viewing all articles
Browse latest Browse all 1374

Draw Line on MapControll

$
0
0
Hi. I try to draw line on map.

Code:

public static List<IPoint> pointness=new List<IPoint>();
 private void button1_Click(object sender, System.EventArgs e)
        {
            IPoint points = new PointClass();
            points.PutCoords(x, y);
            pointness.Add(points);
            ILine pLine1 = new LineClass();
            if (pointness.Count > 1)
            {
                for (var i = 0; i < pointness.Count - 1; i++)
                {
                    pLine1.PutCoords(pointness[i], pointness[i + 1]);
                }
            }
        }

I have List of points. Coordinates of point is coordinates of mouse, when it's click on map. To list points adds allright, but don't drawed.
Why? Maybe i set bad coordinates? I use coordinates like in Identify Tool.

Viewing all articles
Browse latest Browse all 1374

Trending Articles