[OpenLayers-Dev] removing a vector layer within a RootContainer
ahocevar at opengeo.org
Mon May 17 08:42:08 EDT 2010
I don't think that removing a layer from the map which is also used by active controls is supported in general.
Why don't you remove (or at least deactivate) the control first?
On May 17, 2010, at 14:08 , Pierre Giraud wrote:
> Hi all,
> I think I found a bug, but I prefer to ensure I'm not doing something wrong.
> In the "select feature multilayer" example , calling removeLayer on
> the vector layers behaves weirdly.
> Trying the following :
> var layer = map.layers;
> the layer is effectively removed from the list of layers, however, the
> features are still displayed.
> Actually, it looks like the <g> tag corresponding to this layer in the
> RootContainer <svg> tag is not removed.
> Am I missing something ?
>  http://dev.openlayers.org/nightly/examples/select-feature-multilayer.html
> Pierre GIRAUD
> Géomaticien, Analyste
> Camptocamp France SAS
> Savoie Technolac, BP 352
> 73377 Le Bourget du Lac, Cedex
> Tel : 00 33 4 79 44 44 93
> Mail : pierre.giraud at camptocamp.com
> Dev mailing list
> Dev at openlayers.org
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
More information about the Dev