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