[OpenLayers-Users] SelectFeature control: adding dynamically a selectable layer

Simone Gadenz simone.gadenz at jrc.it
Fri Jun 19 10:12:43 EDT 2009


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/03da3eff/attachment.html


More information about the Users mailing list