This project has moved. For the latest updates, please go here.

Label Position

Topics: SharpMap v0.9 / v1.x
Nov 1, 2012 at 6:03 PM

Hello. I have a Vector Layer (Point) that may have more than one feature on the same coordinates.

If I add a Label Layer, labels for points on the same coordinate are all in the same place one above anothers.

Is there a way to change label positions, so all labels in the same coordinates are next to each other or in different positions in order to understand each label text ?



Nov 2, 2012 at 3:06 PM


Experiment with the SharpMap.Styles.LabelStyle

(i.e. labelLayer.Theme movin_labels_around = new SharpMap.Rendering.Thematics.CustomTheme(GetCustomStyle_Movin_Labels); )

     public SharpMap.Styles.LabelStyle GetCustomStyle_Movin_Labels(SharpMap.Data.FeatureDataRow row)
            //in here you may have to set up and update some look-aside structure or structures to keep track of what you have done....then set style.Offset or some such thing..

            return style;



Nov 5, 2012 at 6:27 PM

Thanks Dennis

I'll try your suggestion and let you know if succeed