<span class="Apple-style-span" style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">Hi,<div><br></div><div>Let&#39;s say I have two overlays:</div><div> - one made of markers for which I want to handle a click event</div>

<div> - one other made of curves for which I just want to a handle a hover event</div><div>How can I use the SelectFeature to make these two events working well? Apparently OL doesn&#39;t support multiple addControl(&lt;SelectFeature&gt;) and only handle the last one passed through the addControl method.</div>

<div><br></div><div>In addition, I am using a DragFeature to move some other markers (on a third overlay) and I loose that control too when enabling the SelectFeature control on another layer.</div><div><br></div><div>I know how to handle one layer with the SelectFeature:</div>

<div>---</div><div><div>/* for each layer */</div><div>layer.events.on({</div><div>  featureselected: function(e) { onHover(e.feature); },</div><div>  featureunselected: function(e) { onBlur(e.feature); }</div><div>});</div>

<div>/* and then */</div><div>var hover = new OpenLayers.Control.SelectFeature(</div><div>  &lt;1 layer or an array of&gt;, {</div><div>  clickout: false, toggle: false,</div><div>  multiple: false, hover: true,</div><div>

  box: false</div><div>});</div><div><div>map.addControl(hover);</div><div>hover.activate();</div></div><div>----</div><div><br></div><div>Any idea?</div></div></span><div><br></div>-- <br><div>Fabien Renaud<br></div><div>

Georgia Tech Student in Computer Science</div><div>ENSEEIHT Student in Computer Science and Applied Mathematics</div>Phone: 0033 678-363-272<br>Email: <a href="mailto:contact@fabienrenaud.com" target="_blank">contact@fabienrenaud.com</a><br>

<div>Web: <a href="http://www.fabienrenaud.com" target="_blank">http://www.fabienrenaud.com</a><br></div><br>