Hi Richard,
Here is the code you can look at
InMemoryMarkerOverlay markerOverlay = new InMemoryMarkerOverlay("MarkerOverlay");
markerOverlay.ZoomLevelSet.ZoomLevel01.DefaultMarkerStyle.WebImage = new WebImage("../../theme/default/img/marker_blue.gif", 21, 25);
markerOverlay.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
markerOverlay.Click += new EventHandler<MarkerOverlayClickEventArgs>(markerOverlay_Click);
Map1.CustomOverlays.Add(markerOverlay);
Collection<Feature> result = new Collection<Feature>();
string connectionString = ConfigurationManager.AppSettings["SqlConnectionString"];
OleDbConnection connection = new OleDbConnection(connectionString);
try
{
connection.Open();
string sql = string.Format("select * from marker");
OleDbCommand command = new OleDbCommand(sql, connection);
OleDbDataReader reader = command.ExecuteReader();
while (reader.Read())
{
double x = (double)reader["latitude"];
double y = (double)reader["longitude"];
markerOverlay.Features.Add(new Feature(new Vertex(x, y)));
}
}
finally
{
connection.Close();
}
James