Map Layers issue v2.4

Last post 6/22/2009 12:21:15 PM by Chris Pietschmann. 1 replies. << Back to Web.Maps.VE v2.0 General
6/22/2009 10:51:42 AM
Arul

Map Layers issue v2.4

Hi,

I have  set the VE 2.4 map property as AsyncPostbackPassShapes="false".

and I tried to create and delete a layer (Map1.Layers[0].Shapes.add()")

Is it possible to read the layer to delete it (Map1.Layers[0].Shapes.Clear(), which I previously created using the code "Map1.Layers[0].Shapes.add()". 

Thanks

6/22/2009 12:21:15 PM
Chris Pietschmann

Re:Map Layers issue v2.4

The reason this will not work is because you are setting AsyncPostbackPassShapes to False; which tells it to never send the list of Shape Layers and Shapes back to the server on an asynchronous postback. And, since the control does not know about any Shape Layers or Shapes plotted during an asynchronous postback with AsyncPostbackPassShapes you are unable to Remove/Delete a single Shape from a certain Layer. You can however clear the entire map by removing all Shape Layers during an asynchronous postback with AsyncPostbackPassShapes set to False.

The way this works is really by design so that you can get the maximum performance out of the control when plotting many Shapes at a time while implementing a dynamic style map search.