<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Just for the notes: it works like this:<div><br></div><div><div><span class="Apple-tab-span" style="white-space:pre">        </span>selectControl = new OpenLayers.Control.SelectFeature(</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>vecLayer,</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>{&nbsp;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>hover: true&nbsp;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>}</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>);</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>map.addControl(selectControl);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>selectControl.activate();</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vecLayer.events.on({</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>featureselected: function(e)</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>{</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>createPopup(e.feature);</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>},</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>featureunselected: function(e)</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>{</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>popup.destroy(e.feature)</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>}</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>});</div><div><br></div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>function createPopup(feature)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>{</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>var content = "&lt;div style='font-size:.9em; width:270px;'&gt;&lt;b&gt;" + <a href="http://feature.attributes.name">feature.attributes.name</a> + "&lt;/b&gt;&lt;hr /&gt;" + "&lt;/div&gt;";</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>popup = new GeoExt.Popup({</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>title: 'Details',</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>feature: feature,</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>width:270,</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>height:170,</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>html: content,</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>collapsible: true</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>});</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>popup.on({</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>close: function()&nbsp;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>{</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>if(OpenLayers.Util.indexOf(vecLayer.selectedFeatures, this.feature) &gt; -1)&nbsp;</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>{</div><div><span class="Apple-tab-span" style="white-space:pre">                                        </span>selectControl.unselect(this.feature);</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>}</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>}</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>});</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>popup.show();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div><div><br></div></div><div><br></div><div>Thanks for the tips!</div><div><br></div><div>Stef</div><div><br><div><div><div>On Aug 10, 2010, at 9:49 PM, Adam Ratcliffe wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Stefan,<div><br></div><div>I haven't used the 'hover' myself but the docs say "</div><div><span class="Apple-style-span" style="font-family: Verdana, Arial, sans-serif; font-size: 12px; "><br></span></div><div><span class="Apple-style-span" style="font-family: Verdana, Arial, sans-serif; font-size: 12px; ">Cheers</span></div><div><span class="Apple-style-span" style="font-family: Verdana, Arial, sans-serif; font-size: 12px; ">Adam</span></div><div><br><div><div>On 10/08/2010, at 11:10 PM, Stefan Schwarzer wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br><blockquote type="cite">Have you tried the 'hover' constructor option for the SelectFeature control? &nbsp;<a href="http://dev.openlayers.org/apidocs/files/OpenLayers/Control/SelectFeature-js.html">http://dev.openlayers.org/apidocs/files/OpenLayers/Control/SelectFeature-js.html</a><br></blockquote><br>Cool, working!!<br><br>selectControl = new OpenLayers.Control.SelectFeature(vecLayer,{ hover: true});<br><br>However, any idea how I can close then the popups automatically again?<br><br>Warmest thanks for the tips!<br><br>Stef</div></blockquote></div><br></div></div></blockquote></div><br></div></div></body></html>