<html xmlns:ns1="http://schemas.microsoft.com/office/2004/12/omml">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered)">
<style>
<!--a:link
        {mso-style-priority:99;}
span.MSOHYPERLINK
        {mso-style-priority:99;}
a:visited
        {mso-style-priority:99;}
span.MSOHYPERLINKFOLLOWED
        {mso-style-priority:99;}
p.MSOLISTPARAGRAPH
        {mso-style-priority:34;}
li.MSOLISTPARAGRAPH
        {mso-style-priority:34;}
div.MSOLISTPARAGRAPH
        {mso-style-priority:34;}
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:Calibri;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p.msolistparagraph, li.msolistparagraph, div.msolistparagraph
        {margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:Calibri;}
span.EmailStyle18
        {font-family:Calibri;
        color:windowtext;}
span.EmailStyle19
        {font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
/* List Definitions */
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial'>See: <a
href="http://www.openlayers.org/dev/examples/georss.html">http://www.openlayers.org/dev/examples/georss.html</a>.
</span></font></p>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial'> </span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt;font-family:"Times New Roman"'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Simone Gadenz<br>
<b><span style='font-weight:bold'>Sent:</span></b> Friday, June 19, 2009 9:13
AM<br>
<b><span style='font-weight:bold'>To:</span></b> users@openlayers.org;
beate.stollberg@jrc.ec.europa.eu<br>
<b><span style='font-weight:bold'>Subject:</span></b> [OpenLayers-Users]
SelectFeature control: adding dynamically a selectable layer</span></font></p>
</div>
<p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'> </span></font></p>
<p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'>Dear
all,</span></font></p>
<p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'> </span></font></p>
<p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'>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. </span></font></p>
<p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'> </span></font></p>
<p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'>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:</span></font></p>
<p class=msolistparagraph style='text-indent:-.25in'><font size=2 face=Calibri><span
style='font-size:11.0pt'>1-<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'> </span></font></span></font>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</p>
<p class=msolistparagraph style='text-indent:-.25in'><font size=2 face=Calibri><span
style='font-size:11.0pt'>2-<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'> </span></font></span></font>Implementing
the addLayer, removeLayer methods into the selectFeature control</p>
<p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'> </span></font></p>
<p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'>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?</span></font></p>
<p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'> </span></font></p>
<p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'>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?</span></font></p>
<p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'> </span></font></p>
<p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'>Thank
you all</span></font></p>
<p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'> </span></font></p>
<p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'>Simone</span></font></p>
</div>
</body>
</html>