This project is read-only.

Dotspatial legend

Dec 6, 2012 at 4:58 AM

Hi All,

I am using dotspatial legend for display of S57 dataset in my application , where I am using C# as my coding

I could see layers list in legend but unable to get the layers name in legend, if anybody worked on it please let me know how to do it.

Dec 7, 2012 at 9:07 AM

           This is my code for solve your problem,

           List<ILegendItem> rootNodes = this.legend1.RootNodes;
            ILegendItem one = rootNodes[0];
            IEnumerable <ILegendItem> Nodes = one.LegendItems;
            foreach (ILegendItem node in Nodes)
                if(node.IsSelected )



Dec 13, 2012 at 9:35 AM

Hey Thanks for the response , here with the code given above in which event shall i write this code

Dec 13, 2012 at 10:49 AM

Some how I got the layers(object name ) in the legend .

If I have 30 feature set for a single object , it is displaying all the features , here i want to group 30 features of same object as a single unit rather than 30 different .

How do we group all the features into respective objects.

Jun 11, 2013 at 3:36 AM
How did u manage it for me it aint working as well.....
Jul 15, 2013 at 11:16 PM
I do this here with this command
       pPointMapLayer.LegendText = "Binnen of buiten onderzoeksgebied"
            Dim Layer As IMapLayer = Form1.myVenster.Layers.Add(fsAdres)
            Dim pPointMapLayer As IMapFeatureLayer
            If Layer IsNot Nothing Then
                If Layer.ProjectionString Is Nothing Then
                    Layer.Projection = DefineProjection()
                End If
                fsAdres = TryCast(Layer.DataSet, IFeatureSet)
                pPointMapLayer = TryCast(Layer, IMapFeatureLayer)
                pPointMapLayer.Symbology = SetSwungOnderzoeksgebieden(fsAdres)
                pPointMapLayer.LegendText = "Binnen of buiten onderzoeksgebied"
                ' *************************************************************************
                ' *************************************************************************
                statusTEKST = "Laag Adressen_Op_Onderzoeksgebieden gemaakt en weergegeven"
                Form1.ProgramStatusLabel.Text = statusTEKST
                fsAdres = Nothing
            End If