I have a fairly complex map with various InMemoryFeatureLayer instances providing various dynamic features. In some of those layers, I have hooked up a handler for layer.DrawingFeatures where I mostly just decide what to display for that label based on current state and user “mode”.
Anyway, one of the annoying features of my current implementation is that when zoomed out, the features are close together and the labels just stack obscuring everything.
Basically I would ideally want to determine whether enough space exists to reasonably present the label, and simply not draw it at all if things are “too crowded”. The definition of “too crowded” is TBD, but clearly depends on size of label vs screen space. It wouldn’t be perfect, but this might take the form of something like “if 1/2” of screen space is > 100’ of world space, then the objects are likely too close together, so don’t draw the labels". Or maybe draw condensed labels with abbreviated content, or ??? That or something similar would produce a reasonably good chance that the labels will not interfere overly much, and I could make the threshold user configured.
Alternately, it could be that I draw the labels only when zoomed in to a lever greater than zoomLevel8, though that would be less ideal since it would be harder for the user to understand, .and the full view extent for some maps is different from others, so the point at which the labels start showing up would vary by a substantial range.
But those are just the ideas I had when I started looking at this. However, it seems like the pieces I need to figure this out are not readily available for my label drawing method hooked to layer.DrawingFeatures. Can you provide some guidance on this?