<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Thanks Arnd, that worked perfectly.<BR><BR>
<HR id=stopSpelling>
From: arnd.wippermann@web.de<BR>To: pj_maloney@hotmail.com<BR>CC: users@openlayers.org<BR>Subject: AW: [OpenLayers-Users] Selecting a feature programmatically?<BR>Date: Thu, 20 Nov 2008 22:08:06 +0100<BR><BR>
<STYLE>
.ExternalClass .EC_hmmessage P
{padding-right:0px;padding-left:0px;padding-bottom:0px;padding-top:0px;}
.ExternalClass BODY.EC_hmmessage
{font-size:10pt;font-family:Verdana;}
</STYLE>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff><SPAN class=EC_203145920-20112008><FONT color=#000000>Hi,</FONT></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><SPAN class=EC_203145920-20112008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial><SPAN class=EC_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=EC_203145920-20112008><FONT color=#000000></FONT></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff><SPAN class=EC_203145920-20112008><FONT color=#000000><SPAN class=EC_203145920-20112008><FONT color=#000000>ctrlSelectFeature</FONT></SPAN>.select(lyr.features[idx]);</FONT></SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff><SPAN class=EC_203145920-20112008><FONT color=#000000></FONT><FONT color=#000000><SPAN class=EC_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=EC_203145920-20112008><FONT color=#000000>Arnd Wippermann</FONT></DIV>
<DIV dir=ltr align=left><BR></DIV></SPAN></FONT>
<DIV dir=ltr align=left>
<HR>
</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><BR><BR>
<HR>
BigSnapSearch.com - 24 prizes a day, every day. <A href="http://clk.atdmt.com/UKM/go/117442309/direct/01/">Search now</A><br /><hr />Click here for FREE customisable desktop wallpapers. <a href='http://wallpapers.msn.com/?ocid=[B001MSN42A0716B]' target='_new'>Get them Now!</a></body>
</html>