[OpenLayers-Users] Deleting a feature
Robert Sanson
SansonR at asurequality.com
Thu Mar 5 21:43:46 EST 2009
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 <dave.potts at pinan.co.uk> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090306/281ddfc5/attachment.html
More information about the Users
mailing list