Just for anyone else trying to do this I was able to get the desired result by using the Map.MarkerOverlay.ZoomLevelSet.ZoomLevel01.CustomMarkerStyle object instead of the Map.MarkerOverlay.ZoomLevelSet.ZoomLevel01.DefaultMarkerStyle in a loop. Each time around I would set the CustomMarkerStyle equal to the following method:
private ValueMarkerStyle GetValueMarkerStyle(string markerId, Feature pointFeature, int counter)
{
StringBuilder contentHtml = new StringBuilder();
contentHtml.Append("")
.Append("<table><tr><td class='tooltitle' align='right'>RailcarName:</td>")
.Append("<td class='toolcontent'>")
.Append(pointFeature.ColumnValues["Name"])
.Append("</td></tr><tr><td class='tooltitle' align='right'>Date:</td>")
.Append("<td class='toolcontent'>")
.Append(DateTime.Parse(pointFeature.ColumnValues["Date"]).ToString("MMM d, yyyy"))
.Append("</td></tr><tr><td class='tooltitle' align='right'>Location:</td>")
.Append("<td class='toolcontent'>")
.Append(pointFeature.ColumnValues["Location"])
.Append("</td></tr></table>")
.Append("");
MarkerValueItem valueItem = new MarkerValueItem(markerId);
WebImage image = new WebImage("MapSuiteData/theme/default/img/marker_green.gif", 21, 25);
image.FontStyle = new GeoFont("Arial", 8, DrawingFontStyles.Bold);
image.TextOffsetX = 5;
image.TextOffsetY = 2;
image.Text = counter.ToString();
valueItem.DefaultMarkerStyle.WebImage = image;
valueItem.DefaultMarkerStyle.WebImage.ImageOffsetY = -27;
valueItem.DefaultMarkerStyle.Popup.ContentHtml = contentHtml.ToString();
valueItem.DefaultMarkerStyle.Popup.AutoSize = true;
valueItem.DefaultMarkerStyle.Popup.AutoPan = true;
markerStyle.ValueItems.Add(valueItem);
return markerStyle;
}
I stored my business data in a Feature using the following code:
Dictionary<string, string> dictionaryAttributes = new Dictionary<string, string>();
dictionaryAttributes.Add("Id", dr["Id"].ToString());
dictionaryAttributes.Add("Name", dr["Name"].ToString());
dictionaryAttributes.Add("Date", dr["Date"].ToString());
dictionaryAttributes.Add("Location", dr["Location"].ToString());
Feature pointFeature = new Feature(new PointShape(Longitude, Latitude), dictionaryAttributes);