<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18928"></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial>Hi,</FONT></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial>you can use the
OpenLayers.Control.SelectFeature. There is a function select with a feature to
select as argument.</FONT></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial>ctrlSelectFeatures
= new OpenLayers.Control.SelectFeature(...);</FONT></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial>function
radioSelectFeature(idx)<BR>{<BR> var vlyr =
map.layers[1];</FONT></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial>
try{<BR>
ctrlSelectFeatures.unselect(vlyr.selectedFeatures[0]);<BR>
}catch(err){document.getElementById("featDesc").innerHTML='error'};</FONT></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial>
ctrlSelectFeatures.select(vlyr.features[idx]);<BR>}</FONT></DIV>
<DIV><SPAN class=718171021-23072010><FONT color=#0000ff size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=718171021-23072010><FONT color=#0000ff size=2
face=Arial>from</FONT></SPAN></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><A
href="http://gis.ibbeck.de/ginfo/apps/OLExamples/OL26/examples/select-feature-with-function.html">http://gis.ibbeck.de/ginfo/apps/OLExamples/OL26/examples/select-feature-with-function.html</A></FONT></DIV>
<DIV> </DIV><FONT color=#0000ff size=2 face=Arial></FONT>
<DIV><SPAN class=718171021-23072010><FONT color=#0000ff size=2
face=Arial>Arnd</FONT></SPAN></DIV>
<DIV><SPAN class=718171021-23072010><FONT color=#0000ff size=2
face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr lang=de class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>Von:</B> users-bounces@openlayers.org
[mailto:users-bounces@openlayers.org] <B>Im Auftrag von </B>Alex
Brandsen<BR><B>Gesendet:</B> Freitag, 23. Juli 2010 18:18<BR><B>An:</B>
emmexx<BR><B>Cc:</B> users@openlayers.org<BR><B>Betreff:</B> Re:
[OpenLayers-Users] Manually 'select' feature<BR></FONT><BR></DIV>
<DIV></DIV>Thanks for replying!<BR><BR>getFeatureById() and
OpenLayers.Layer.Vector.selectedFeatures both return feature(s), I don't see how
I can use these functions to select features?<BR><BR>Alex.<BR><BR>
<DIV class=gmail_quote>On Thu, Jul 22, 2010 at 2:56 PM, emmexx <SPAN
dir=ltr><<A
href="mailto:emmexx@tiscalinet.it">emmexx@tiscalinet.it</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>
<DIV class=im>Il 22/07/2010 15:24, Alex Brandsen scrisse:<BR></DIV>
<DIV>
<DIV></DIV>
<DIV class=h5>> Hi all,<BR>><BR>> I was wondering if there is a way
to manually select a feature, i.e.<BR>> when a feature is clicked, I want
to select a feature next to it as well.<BR>> I can't seem to find any
documentation on this, unfortunately.<BR><BR></DIV></DIV>
<DIV>
<DIV></DIV>
<DIV class=h5>You can
use:<BR><BR>OpenLayers.Layer.Vector.getFeatureById()<BR><BR>or the
undocumented/private/I can't find it in the api
docs<BR><BR>OpenLayers.Layer.Vector.selectedFeatures
array.<BR><BR>bye<BR>
maxx<BR></DIV></DIV></BLOCKQUOTE></DIV><BR></BODY></HTML>