destroy the feature when we leave
authorChristopher Schmidt <crschmidt@crschmidt.net>
Mon, 21 Apr 2008 23:22:08 +0000 (23:22 +0000)
committerChristopher Schmidt <crschmidt@crschmidt.net>
Mon, 21 Apr 2008 23:22:08 +0000 (23:22 +0000)
app/views/browse/start.rjs

index 5ea29921ef2f745fdde4a591a63b32508a048aea..e8bbb17205e36c853357a11c796c936ad40ec876 100644 (file)
@@ -29,7 +29,11 @@ page << <<EOJ
      if (sf) {   
          sf.destroy();  
          sf = null;
-     }  
+     } 
+     if (currentFeature) {
+         currentFeature.destroy(); 
+         currentFeature = null; 
+     } 
  }
  function startDrag() {
    $("drag_box").innerHTML='Drag a box on the map to select an area';