We have a class based on InMemoryFeatureLayer to override the DrawCore to handle some custom drawing on the Features (markers) on the MapSuite map in the Desktop Edition. We use the DrawCore to accomplish a ClusterPoint style which create a single cluster point icon when the markers are too close that they overlap and also to implement a Z-order which brings a marker to the top when it has been selected.
Now we would like to show labels on the map for the markers but we would like the TextStyle.OverlappingRule.NoOverlapping to work to automatically show only a single label when the markers are too close to each other. The labels are defined by a column value on the feature.
I have studied the samples such as LabelingBasedOnColumns, LabelingBasedOnSize, MultiColumnLabeling, etc. and I have tried defining the DefaultTextStyle and ColumnBasedTextStyle on the ZoomLevelSet but these Styles seem to be ignored. No matter how I have defined the TextStyles, I do not see any labels on the map. The only way I can get the labels to show on the map is when I make a call to either DrawText or DrawTextWithScreenCoordinate on the GeoCanvas in the DrawCore method of the InMemoryFeatureLayer based class. When I make this call, it does not prevent the overlapping labels from showing so the labels come out as a large blob of unreadable color.
I am attaching a screen shot and the InMemoryFeatureLayer class. I am hoping that someone can give me some insight on a way to implement this so that I can have both the customized DrawCore and the labels with the OverlappingRule.NoOverlapping at the same time.
I appreciate any suggestions and thank you in advance for spending the time to look at my problem.
Richard