This project is read-only.

Label Polygon features

Apr 3, 2013 at 6:59 AM

I am using DemoWeb sample and modified to read the geometry from sqlserver and displayed it on web.As i am querying nonspatial (string) column along with geometry column where i need to used that values as labels for each polygon feature. Can anyone help in this.

As i tried with
 LabelSymbolizer stateLabelSymbolizer = new LabelSymbolizer()
                FontFamily = "Tahoma",
                FontColor = Color.Black,
                FontSize = 8,
                BackColor = Color.White,
                BackColorEnabled = true,
                BackColorOpacity = 0.5f,
                Orientation = ContentAlignment.MiddleRight,
                PartsLabelingMethod = PartLabelingMethod.LabelAllParts,
                OffsetX = 5
            ILabelCategory stateLabelCategory = new LabelCategory()
                Expression = name,
                Symbolizer = stateLabelSymbolizer,
                //Name = "Vessels' MMSIs"

            StateMaplayer.LabelLayer = new MapLabelLayer(test);
            StateMaplayer.ShowLabels = true;
Its assigning same values for all the polygons as the labels are assigning to all layer not to particular polygon.

Arun Mohan