[OpenLayers-Users] SelectFeature control: adding dynamically
a selectable layer
Brent Lund (ADM)
Brent.Lund at state.mn.us
Fri Jun 19 10:48:25 EDT 2009
See: http://www.openlayers.org/dev/examples/georss.html.
________________________________
From: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] On Behalf Of Simone Gadenz
Sent: Friday, June 19, 2009 9:13 AM
To: users at openlayers.org; beate.stollberg at jrc.ec.europa.eu
Subject: [OpenLayers-Users] SelectFeature control: adding dynamically a selectable layer
Dear all,
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:
1- When a new layer is added the existent selectFeature control is destroyed and a new one is instantiated with the complete list of the desired layers
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?
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?
Thank you all
Simone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090619/c88e93c7/attachment.html
More information about the Users
mailing list