Removing layer from server side.

Last post 4/3/2009 1:44:33 AM by Chris Pietschmann. 1 replies. << Back to Web.Maps.VE v2.0 General
3/24/2009 6:15:23 PM
prestorm

Removing layer from server side.

Hi Chris,

I am trying to remove a layer on serverside. How can I specifically remove a layer rather that doing map1.layers.clear();

I understand that there are map1.layers.remove() removeall() removeat() but wasn't sure how to use it.

Is there a way to access shapes/layers that were created on server-side?

I un

4/3/2009 1:44:33 AM
Chris Pietschmann

Re:Removing layer from server side.

Yes, you can use the Map.Layers.Remove, Map.Layers.RemoveAt and Map.Layers.RemoveAll methods to remove ShapeLayers from the Map during an Asynchronous Postback.

In the current release (v2.00.03) there is currently a bug that generates a javascript exception when you try to remove multiple (more than one) shape layers from the map during the same asynchronous postback. This issue will be fixed in the next update release (v2.00.04) when it is released within the next few weeks.