Hi, On Fri, Jun 19, 2009 at 4:12 PM, Simone Gadenz<[email protected]> wrote: > I am using successfully the SelectFeature control with a list of layers but, > since my application allows the users to add other GeoRSS and KML layers > dynamically, I would like to make them selectable. > > Looking at the code it seems it is not implemented. In your opinion what is > the best implementation strategy to write this function? So far I though > only two possibilities: > > 2- Implementing the addLayer, removeLayer methods into the > selectFeature control > > I would prefer the second but I cannot understand fully the role of the > RootContainer. Do I have to destroy it and reinitialize, or are there other > alternatives?
Have a look at the collectRoots and resetRoots methods of the RootContainer. The root container collects the SVG/VML root nodes of the selectable layers and moves them to the top of the layer stack. This is required to get events on all selectable layers. The RootContainer layer itself has to be on top of the layer stack, which is enforced in the SelectFeature control by adding the layer to the map when activating the control, and removing it when deactivating. If you want to implement that (or contract someone to implement it for you) and contribute it back to OpenLayers, you may want to continue this thread on [email protected], and have a look at http://trac.openlayers.org/wiki/HowToContribute. > I also found a small bug performing multiple selections through the SHIFT > key in Firefox. As result it opens a new FF windows, also in the example on > the official website. Somebody solved that already? I don't remember that it was reported, so you might want to create a ticket with a detailled description. See http://trac.openlayers.org/wiki/FilingTickets for details. Regards, Andreas. > > > > Thank you all > > > > Simone > > _______________________________________________ > Users mailing list > [email protected] > http://openlayers.org/mailman/listinfo/users > > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
