Hi Pierre, 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? Regards, Andreas. 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 [1], calling removeLayer on > the vector layers behaves weirdly. > > Trying the following : > {{{ > var layer = map.layers[1]; > map.removeLayer(layer); > }}} > 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 ? > > Regards, > Pierre > > [1] 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.gir...@camptocamp.com > http://www.camptocamp.com > _______________________________________________ > Dev mailing list > Dev@openlayers.org > http://openlayers.org/mailman/listinfo/dev -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. _______________________________________________ Dev mailing list Dev@openlayers.org http://openlayers.org/mailman/listinfo/dev