How can i join pont by line ?

1/13/2013 5:11:54 AM
Total Posts 23

How can i join pont by line ?

I have tried to join point in aspmap 4.7 but can not success . how can i succeeded to join line of each points without animation?

1/15/2013 6:37:35 AM
MVP
Total Posts 323

Re: How can i join pont by line ?

Do you need to add a point into an existed line shape?

1/16/2013 3:16:37 AM
Total Posts 23

Re: How can i join pont by line ?

No. I mean , i want to add lines between different point shape... for example " I have taken different point location from GPS  during patrolling or root march time. Now i were able to add point shape in aspmap 4.7 from database, but now i want to display like a road after joining lines between point to point shape. "

 

1/17/2013 2:13:29 AM
MVP
Total Posts 323

Re: How can i join pont by line ?

Separate points from databases can be displayed as point layers only.

To display them as lines, you have to add the points from the DataTable to a line shape, then add the shape to the map.

AspMap.Points line = new AspMap.Points(ShapeType.Line);

foreach (DataRow row in dataTable.Rows)
{
   line.Add(Convert.ToDouble(row["X"]), Convert.ToDouble(row["Y"]));
}

MapShapes ms = map.MapShapes.Add(line);

ms.Symbol.LineColor = Color.Green;
ms.Symbol.Size = 2;

The Map.MapShapes collection is persisted between postbacks.