<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-15">
<META content="MSHTML 6.00.2900.3243" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px">
<DIV>Hi Eric</DIV>
<DIV> </DIV>
<DIV>Thanks for that - yes, the patch fixed the problem.</DIV>
<DIV> </DIV>
<DIV>Cheers,</DIV>
<DIV> </DIV>
<DIV>Robert Sanson</DIV>
<DIV><BR><BR>>>> "Eric Lemoine" <eric.c2c@gmail.com> 16/10/2008 5:51 p.m. >>><BR>See #1741. That would be good to know if the patch makes your problem<BR>go away. Eric<BR><BR>2008/10/16, Eric Lemoine <eric.c2c@gmail.com>:<BR>> Hi. Do you also have a modify feature control? The select feature and<BR>> modify feature controls are known not to play well together. There<BR>> already is a ticket about that, and patch attached to it. Eric<BR>><BR>> 2008/10/16, Robert Sanson <SansonR@asurequality.com>:<BR>>> I have tried destroyFeatures, removeFeatures and eraseFeatures and they<BR>>> all<BR>>> seem to have the same behaviour. The polygon disappears but the vertices<BR>>> remain.<BR>>><BR>>> var delf = new OpenLayers.Control.SelectFeature(crops, {onSelect:<BR>>> function(feature) {crops.destroyFeatures([feature])}});<BR>>> map.addControl(delf);<BR>>> delf.activate();<BR>>><BR>>> Robert Sanson<BR>>><BR>>>>>> Tim Schaub <tschaub@opengeo.org> 5/08/2008 12:13 a.m. >>><BR>>> Hey-<BR>>><BR>>> Adorian Ardelean wrote:<BR>>>> Hi,<BR>>>><BR>>>> After upgrading to OL 2.6, delete feature function does not work<BR>>>> correctly:<BR>>>> when a polygon or polyline is removed, the lines that define the<BR>>>> disappear, but the vertexes not (the vertexes appear as the entity is<BR>>>> selected). The code worked flawlessly in previous version. Is something<BR>>>> that I have to be aware and/or modify?<BR>>>><BR>>>> declaration of control<BR>>>> deletefeature: new<BR>>>> OpenLayers.Control.SelectFeature(vectors,{onSelect:deleteFeature})<BR>>>><BR>>>> delete function<BR>>>> function deleteFeature(geometry)<BR>>>> {<BR>>>> this.layer.removeFeatures(geometry);<BR>>>> }<BR>>>><BR>>>> Any hint that may solve this issue is appreciated,<BR>>><BR>>> I just tried the following and confirmed that the above works.<BR>>><BR>>> 1) open <A href="http://openlayers.org/dev/examples/draw-feature.html">http://openlayers.org/dev/examples/draw-feature.html</A><BR>>> 2) draw a polygon (note freehand is true here)<BR>>> 3) in the firebug console, run this code:<BR>>><BR>>> var del = new OpenLayers.Control.SelectFeature(<BR>>> map.layers[3], {<BR>>> onSelect: function(feature) {<BR>>> map.layers[3].removeFeatures([feature]);<BR>>> }<BR>>> }<BR>>> );<BR>>> map.addControl(del);<BR>>> del.activate();<BR>>><BR>>> 4) click on your polygon to see it removed<BR>>><BR>>> I suspect you really want to be calling destroyFeatures instead of<BR>>> removeFeatures - unless you call feature.destroy elsewhere.<BR>>><BR>>> Tim<BR>>><BR>>>> Adorian<BR>>>><BR>>>> --<BR>>>> Dr. Adorian Ardelean<BR>>>> coordinator of myNature Project<BR>>>><BR>>>> proiectul myNature<BR>>>> str. Rascoala din 1907 nr 12<BR>>>> Timisoara 300523<BR>>>> Romania<BR>>>><BR>>>> <A href="http://mybiosis.info/nature/portal.php?pagename=firstpage">http://mybiosis.info/nature/portal.php?pagename=firstpage</A> [a Romanian<BR>>>> biodiversity-database]<BR>>>> <A href="http://mybiosis.info/nature/portal.php?pagename=adorian">http://mybiosis.info/nature/portal.php?pagename=adorian</A> [CV]<BR>>>><BR>>>><BR>>>> ------------------------------------------------------------------------<BR>>>><BR>>>> _______________________________________________<BR>>>> Users mailing list<BR>>>> Users@openlayers.org<BR>>>> <A href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</A><BR>>><BR>>> _______________________________________________<BR>>> Users mailing list<BR>>> Users@openlayers.org<BR>>> <A href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</A><BR>>><BR>>> ------------------------------------------------------------------<BR>>> The contents of this email are confidential to AsureQuality. If you have<BR>>> received this communication in error please notify the sender immediately<BR>>> and delete the message and any attachments. The opinions expressed in this<BR>>> email are not necessarily those of AsureQuality. This message has been<BR>>> scanned for known viruses before delivery. AsureQuality supports the<BR>>> Unsolicited Electronic Messages Act 2007. If you do not wish to receive<BR>>> similar communications in future, please notify the sender of this<BR>>> message.<BR>>> ------------------------------------------------------------------<BR>>><BR>>><BR>>> This message has been scanned for malware by SurfControl plc.<BR>>> www.surfcontrol.com<BR>>><BR>><BR><BR><BR><BR><BR></DIV><br><br><table bgcolor=white style="color:black"><tr><td><br>------------------------------------------------------------------<br>
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.<br>
------------------------------------------------------------------</td></tr></table></BODY></HTML>