DotSpatial Library : MapWindow Discussion Forum
Hi! I am looping legend for layers and groups inside mwToolStrip.cs and want to remove specific group or specific layer. Here is my code: foreach (ILayer layer in _basicMap.MapFrame) { IGro
mwToolStrip.cs
Posted by: vzavec ()
Date: September 28, 2010 09:56AM

Hi!

I am looping legend for layers and groups inside mwToolStrip.cs and want to remove specific group or specific layer.
Here is my code:

foreach (ILayer layer in _basicMap.MapFrame)
{

IGroup grp = layer as IGroup;

if (grp != null)
{


if (grp.LegendText == "KARTE")
{

// THIS SENTENCE IS NOT WORKING ???

grp.Remove(layer);

//geoMap1.Refresh();
//legend1.RefreshNodes();


}

}
}


Thanks for any help, Vojko

Options: ReplyQuote
Re: mwToolStrip.cs
Posted by: Shade1974 ()
Date: September 29, 2010 11:02AM

I will post this as a bug on DotSpatial. The "Remove" method should be functional here, so if it isn't working, there is likely an unexpected bug.

Shade1974 (Ted)
Dr. Harold A Dunsford Jr.
MapWindow 6.0 & DotSpatial Initial Developer
GEI Consultants

Options: ReplyQuote


Sorry, you do not have permission to post/reply in this forum.





Banner Exchange




GISCP.com




Send us your banner logo (160x120) for the space above, and add this MapWindow banner ad to your site:

Just paste this text in your page: