View Single Post

  #1 (permalink)  
Old 12-09-2005
trinity trinity is offline
Junior Member
White Belt
 
Join Date: Dec 2005
Posts: 3
How do I loop my dataset of Lat/Long into a map using C#?

Using C# & MP2K4, I already have a dataset that contains my Lat/Long values that I want to plot onto a map but I don't know the correct syntax inside my foreach loop. PLEASE HELP!!!!

I don't need to use GetLocation since I already have the coordinates. I just want to shove them onto a map and display them.

//populate my dataset
System.Data.DataSet myDataSet = new System.Data.DataSet();
myDataAdp.Fill(myDataSet,"myTable");

//display a map
MapPoint.Map myMap = axMappointControl1.NewMap(MapPoint.GeoMapRegion.ge oMapNorthAmerica);
MapPoint.DataSet myMapDS = myMap.DataSets.AddPushpinSet("New PushPins");

foreach(DataRow DR in myDataSet.Tables["myTable"].Rows)
{
??????????
}
Reply With Quote