kavehmb2000
05-17-2006, 07:34 AM
Hi everyone
I already generated a table containing name,latitude,longitude of a big amount of points. the code i send here works, but it takes a lifetime to generate the pushpins in desired locations. can anyone please hint me on how to reduce the time for generating them?
(it took almost 15 hours to generate about 2500 points while importing the same data in MapPoint got les than 1 min to show!)
[C#]
// here my dataTable is generated
DataTable mydt = DBAccess.ProcessSpecialRoadPoints(itemChecked.ToSt ring());
MapPoint.Map map =this.axMappointControl1.ActiveMap ;
[color=orange]foreach (DataRow drl in mydt.Rows)
{
MapPoint.Location location = map.GetLocation(Convert.ToDouble(drl["LATITUDE"]), Convert.ToDouble(drl["LONGITUDE"]), 1);
MapPoint.Pushpin pin = map.AddPushpin(location, NAME);
[/color]
}
Thanks in advance
KMB
I already generated a table containing name,latitude,longitude of a big amount of points. the code i send here works, but it takes a lifetime to generate the pushpins in desired locations. can anyone please hint me on how to reduce the time for generating them?
(it took almost 15 hours to generate about 2500 points while importing the same data in MapPoint got les than 1 min to show!)
[C#]
// here my dataTable is generated
DataTable mydt = DBAccess.ProcessSpecialRoadPoints(itemChecked.ToSt ring());
MapPoint.Map map =this.axMappointControl1.ActiveMap ;
[color=orange]foreach (DataRow drl in mydt.Rows)
{
MapPoint.Location location = map.GetLocation(Convert.ToDouble(drl["LATITUDE"]), Convert.ToDouble(drl["LONGITUDE"]), 1);
MapPoint.Pushpin pin = map.AddPushpin(location, NAME);
[/color]
}
Thanks in advance
KMB