index of ShapeLayer

Last post 7/2/2009 8:08:41 AM by patrick.sender. 1 replies. << Back to Web.Maps.VE v2.0 General
7/1/2009 1:20:18 PM
patrick.sender

index of ShapeLayer

i have a List<ShapeLayer> in an application. In the menu the user ckeck one or more checkboxes to show data (loading from a server) on the map. For every layer i create an index and now i want to add the layer (with the shapes inside) at the position of my index to the Map. 

like this:

_ShapeLayer[index].Shapes.Add(shape);
Map1.Layers.Add(_ShapeLayer[index]);

but it doesn't work
7/2/2009 8:08:41 AM
patrick.sender

Re:index of ShapeLayer

Problem is fixed. Sorry, my fault.

_ShapeLayer.Insert(index, layer);
 Map1.Layers.Add(_ShapeLayer[index]);