Thanks Arnd, that worked perfectly.
From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: [EMAIL PROTECTED]: AW:
[OpenLayers-Users] Selecting a feature programmatically?Date: Thu, 20 Nov 2008
22:08:06 +0100
Hi,
i save in a drop down list the index of the features and for selecting i use
ctrlSelectFeature.select(lyr.features[idx]);
(with ctrlSelectFeature = new OpenLayers.Control.SelectFeature(lyr,
ctrlSelectFeatureOptions);)
Arnd Wippermann
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Phil
MaloneyGesendet: Donnerstag, 20. November 2008 12:19An: [EMAIL PROTECTED]:
[OpenLayers-Users] Selecting a feature programmatically?
Hi, An OpenLayers newbie here, so apologies if I've skipped across this subject
being covered else where. 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 : - Hover list items
to highlight corresponding polygons on the map- Click a list item to switch the
corresponding polygon to "edit" mode In essence, what is required to link
external HTML to a polygon feature on the map? Code sample: function
listPolygon(event){ var html = "<a
href=\"JavaScript:editPolygon('"+event.feature.id+"')\">"+event.feature.id+"</a>";
document.getElementById("polygonlist").innerHTML += html + "<br>";}
function editPolygon(e){ controls.select.select(e)} var vectors = new
OpenLayers.Layer.Vector("Vector Layer");vectors.events.on({featureadded":
listPolygon}); I've attempted to use the selectControl.select method to
achieve this with the feature ID...but this is obviously not the correct way of
achieving this. Any pointers appreciated. Phil
BigSnapSearch.com - 24 prizes a day, every day. Search now
_________________________________________________________________
BigSnapSearch.com - 24 prizes a day, every day - Search Now!
http://clk.atdmt.com/UKM/go/117442309/direct/01/_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users