This project has moved and is read-only. For the latest updates, please go here.

How to turn street lables on earlier..

Topics: Algorithms, SharpMap v0.9 / v1.x
Mar 4, 2009 at 10:03 PM
When using Sharpmap to label streets is there a way that I can control when then  the segments are labeled?
One of the issues that I am having is that some segments to not show up and others do.  I have to zoom in more to get the streets to show..  This seems to be the case even on street segments that are long enough to hold the entire name.
Mar 4, 2009 at 10:52 PM
Hi dsjames, labels are culled depending on intersection with other labels. Experiment with LabelLayer.LabelFilterMethod and LabelLayer.MultipartGeometryBehaviour as well as LabelLayer.(Min/Max)Visible and see if you can get the desired result.. hth jd 
Mar 6, 2009 at 1:08 PM
I have worked with all these, they are not quite working out for me.  The default logic seems to work well on everything bug my street layers.
By chance do you know the routines that handle the logic to determine if a lable it turned on or not? I feel a long weekend of leaning new sharpmap code coming up...
Mar 6, 2009 at 2:20 PM
Edited Mar 6, 2009 at 6:01 PM
Hi dsjames, the defaults are from SharpMap.Rendering.LabelCollisionDetection but you can use any method that matches
public delegate void LabelFilterMethod(List<SharpMap.Rendering.Label> labels);
which is equivalent to
hth jd