<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
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>