<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<STYLE>.hmmessage P {
        PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
BODY.hmmessage {
        FONT-SIZE: 10pt; FONT-FAMILY: Verdana
}
</STYLE>
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY class=hmmessage>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff><SPAN
class=203145920-20112008><FONT color=#000000>Hi,</FONT></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><SPAN
class=203145920-20112008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial><SPAN class=203145920-20112008>i save
in a drop down list the index of the features and for selecting i
use</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff><SPAN
class=203145920-20112008><FONT color=#000000></FONT></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff><SPAN
class=203145920-20112008><FONT color=#000000><SPAN
class=203145920-20112008><FONT
color=#000000>ctrlSelectFeature</FONT></SPAN>.select(lyr.features[idx]);</FONT></SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff><SPAN class=203145920-20112008><FONT
color=#000000></FONT><FONT color=#000000><SPAN class=203145920-20112008><FONT
color=#000000>(with ctrlSelectFeature = new
OpenLayers.Control.SelectFeature(lyr,
ctrlSelectFeatureOptions);)<BR></FONT></SPAN></FONT></SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff><SPAN class=203145920-20112008><FONT
color=#000000>Arnd Wippermann</FONT></DIV>
<DIV dir=ltr align=left><BR></DIV></SPAN></FONT>
<DIV dir=ltr align=left>
<HR tabIndex=-1>
</DIV>
<DIV dir=ltr align=left><FONT face=Tahoma><B>Von:</B>
users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] <B>Im Auftrag
von </B>Phil Maloney<BR><B>Gesendet:</B> Donnerstag, 20. November 2008
12:19<BR><B>An:</B> users@openlayers.org<BR><B>Betreff:</B> [OpenLayers-Users]
Selecting a feature programmatically?<BR></FONT><BR></DIV>
<DIV></DIV>Hi,<BR> <BR>An OpenLayers newbie here, so apologies if I've
skipped across this subject being covered else where.<BR> <BR>I am building
a large-scale mapping interface allowing users to draw and edit polygons. I want
to list the polygons drawn (aka Google MyMaps style) outside the map so the user
can :<BR> <BR>- Hover list items to
highlight corresponding polygons on the map<BR>- Click a list item to
switch the corresponding polygon to "edit" mode<BR> <BR>In essence, what is
required to link external HTML to a polygon feature on the
map?<BR> <BR>Code sample:<BR> <BR>function
listPolygon(event){<BR> var html = "<a
href=\"JavaScript:editPolygon('"+event.feature.id+"')\">"+event.feature.id+"</a>";<BR> document.getElementById("polygonlist").innerHTML
+= html + "<br>";<BR>}<BR> <BR>function
editPolygon(e){<BR> controls.select.select(e)<BR>}<BR> <BR>var
vectors = new OpenLayers.Layer.Vector("Vector
Layer");<BR>vectors.events.on({featureadded":
listPolygon});<BR> <BR> <BR>I've attempted to use the
<EM>selectControl</EM>.select method to achieve this with the feature ID...but
this is obviously not the correct way of achieving this.<BR> <BR>Any
pointers
appreciated.<BR> <BR>Phil<BR> <BR> <BR><RTE_TEXT></RTE_TEXT><BR><BR>
<HR>
BigSnapSearch.com - 24 prizes a day, every day. <A
href="http://clk.atdmt.com/UKM/go/117442309/direct/01/" target=_new>Search
now</A> </BODY></HTML>