I am using the MapShapes sample project to define a MapShapeLayer where every feature has its own graphic properties. I have also configured the layer to use labels. However, the labels do not display on the layer when the layer is drawn (the shapes do).
Here's my code:
public class MapShapeLayer : InMemoryFeatureLayer
{
MapShapeLayer()
{
this.Open();
this.Columns.Add(new FeatureSourceColumn("Label", "String", 30));
this.Close();
this.ZoomLevelSet.ZoomLevel101.DefaultTextStyle = TextStyles.City1("Label");
this.ZoomLevelSet.ZoomLevel101.DefaultTextStyle.PointPlacement - PointPlacement.LowerRight;
// etc.
}
}
I use the same DrawCore method as defined in the project.
My BaseMapShape class has a property called "Label" that does the following:
public class BaseMapShape
{
public string Label
{
set { Feature.ColumnValues.Add("Label", value);}
}
}
This property is executed whenever I add a BaseMapShape object to the MapShapes collection.
Nonetheless (as mentioned above) the labels do not appear on the map when the layer is drawn.
What else do I have to do in order to display labels?
Thanks!