<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; FONT: 10pt Tahoma">
<DIV>Does anyone know how to remove and reload a GML layer?</DIV>
<DIV> </DIV>
<DIV>I have a layer added to my map as:</DIV>
<DIV> </DIV>
<DIV>va map, fbnd;</DIV>
<DIV> </DIV>
<DIV>fbnd = new OpenLayers.Layer.GML("Farm boundary",<BR> "<A href='http://10.65.192.1/cgi-bin/agbwfs.exe?farmid="+farmid+"&request=getfeature&typename=farm&service=wfs&version=1.0.0&BBOX="+x1+","+y1+","+x2+","+y2+"&maxfeatures=120'>http://10.65.192.1/cgi-bin/agbwfs.exe?farmid="+farmid+"&request=getfeature&typename=farm&service=wfs&version=1.0.0&BBOX="+x1+","+y1+","+x2+","+y2+"&maxfeatures=120</A>",<BR> {singleTile: true, style: farm_style, extractAttributes: true});<BR> map.addLayer(fbnd);</DIV>
<DIV> </DIV>
<DIV>I then do some edits to the database.</DIV>
<DIV> </DIV>
<DIV>I now want to remove it and reload it, based on a user clicking a button</DIV>
<DIV> </DIV>
<DIV>I tried:</DIV>
<DIV> </DIV>map.removeLayer(fbnd,false);
<DIV> </DIV>
<DIV>This works, but then iI tried to reload it as:</DIV>
<DIV> </DIV>
<DIV>fbnd = new OpenLayers.Layer.GML("Farm boundary",<BR> "<A href='http://10.65.192.1/cgi-bin/agbwfs.exe?farmid="+farmid+"&request=getfeature&typename=farm&service=wfs&version=1.0.0&BBOX="+x1+","+y1+","+x2+","+y2+"&maxfeatures=120'>http://10.65.192.1/cgi-bin/agbwfs.exe?farmid="+farmid+"&request=getfeature&typename=farm&service=wfs&version=1.0.0&BBOX="+x1+","+y1+","+x2+","+y2+"&maxfeatures=120</A>",<BR> {singleTile: true, style: farm_style, extractAttributes: true});<BR> map.addLayer(fbnd);</DIV>
<DIV> </DIV>
<DIV>This seems to load the same data without forcing a refresh.</DIV>
<DIV> </DIV>
<DIV>Any clues?</DIV>
<DIV> </DIV>
<DIV>Many thanks,</DIV>
<DIV> </DIV>
<DIV>Robert</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><br><br>
<P align=center><FONT style="BACKGROUND-COLOR: #ffffff">This message has been scanned for malware by SurfControl plc. </FONT><A href="http://www.surfcontrol.com/"><FONT style="BACKGROUND-COLOR: #ffffff" color=#000000>www.surfcontrol.com</FONT></A></P>
</body></HTML>