How can I programatically simulate clicking a feature while in Modify mode?
I have the following code which adds the feature to the EditOverlay from WellKnownText:
var layer = Map1.GetOpenLayersMap().getLayersByName('<%=Map1.EditOverlay.Name %>')[0];
var wkt = new OpenLayers.Format.WKT();
layer.addFeatures(wkt.read(THE_WELLKNOWNTEXT));
This works fine, but I'd like to eliminate the step of making the user click the shape to select it for editing.
I've looked around, and it looks like I need to use the "selectFeature()" function of OpenLayers.Control.ModifyFeature. I'm guessing there is already one of these somewhere, but I'm not sure what you guys have going on under the hood.
Any ideas?