Show/hide shape layers

Last post 7/3/2008 7:32:39 PM by Chris Pietschmann. 3 replies. << Back to Web.Maps.VE v2.0 General
7/2/2008 4:34:40 PM
russellmason

Show/hide shape layers

Hi

I need to show/hide shape layers but even if I set the ShapeLayer's Visible property to false its still shown.

Any ideas?

Thanks
Russell Mason

7/2/2008 8:19:28 PM
Chris Pietschmann

Re:Show/hide shape layers

This is actually a small bug in the control. It will be fixed in an update release that will be posted by the end of the week.

You can view the Web.Maps.VE v2.0 Product Roadmap for more information about future and past update releases.
7/3/2008 9:17:24 AM
russellmason

Re:Show/hide shape layers

Hi

Also ... I if I try to remove existing shapes from a layer

e.g. Map1.Layers[1].Shapes.RemoveAt(0);

nothing happens. Same thing if I try to remove an entire layer.

Thanks
Russell Mason

7/3/2008 7:32:39 PM
Chris Pietschmann

Re:Show/hide shape layers

The Layer and Shape collections are instances of the generic DirtyStateList collection object in the Simplovation.Web.Maps.VE.Collections namespace. The DirtyStateList doesn't currently keep track of the "dirty" state when you use the RemoveAt methods. This will be fixed in the next update release, but until then you can do the following:

Map1.Layers.Remove(Map1.Layers[1]);     Map1.Layers[1].Shapes.Remove(Map1.Layers[1].Shapes[0]);