Hi Dave
Here is a snippet of code that I use:
controls = {
select: new OpenLayers.Control.SelectFeature(crops, {callbacks:
{'over':feature_info}}),
dpolygon: new
OpenLayers.Control.DrawFeature(crops,OpenLayers.Handler.Polygon),
modify: new OpenLayers.Control.ModifyFeature(crops),
delf: new OpenLayers.Control.SelectFeature(crops, {onSelect:
function(feature) {crops.destroyFeatures([feature])}})
};
for(var key in controls) {
map.addControl(controls[key]);
}
Cheers,
Robert Sanson
>>> Dave Potts <[email protected]> 6/03/2009 12:49 p.m. >>>
Its possible to create a feature on map using routines such as
DrawFeature, but how do you delete a feature once its been created?
Dave.
------------------------------------------------------------------
The contents of this email are confidential to AsureQuality. If you have
received this communication in error please notify the sender immediately and
delete the message and any attachments. The opinions expressed in this email
are not necessarily those of AsureQuality. This message has been scanned for
known viruses before delivery. AsureQuality supports the Unsolicited Electronic
Messages Act 2007. If you do not wish to receive similar communications in
future, please notify the sender of this message.
------------------------------------------------------------------
This message has been scanned for malware by SurfControl plc.
www.surfcontrol.com
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users