--- location.module	2007-08-22 20:09:16.000000000 -0500
+++ locationNew.module	2008-02-25 15:34:21.000000000 -0600
@@ -1101,6 +1101,11 @@ function location_nodeapi(&$node, $op, $
       }
       return $items;
       break;
+      
+    case 'delete':
+      _location_delete($node, 'node');
+      break;
+      
   }
 }
 
@@ -1486,6 +1491,10 @@ function location_user($op, &$edit, &$us
     return array(t('Location') => $items);
   }
   
+  if ($op == 'delete') {
+    _location_delete($user, 'user');
+  }
+  
 }
 
 /**
@@ -1567,3 +1576,11 @@ function location_invoke_locationapi(&$l
   }
   return $return;
 }
+
+/**
+ * Deletes a location associated with a user or node object. 
+ */
+function _location_delete($user_or_node, $type = 'node') {
+  $field = ($type == 'node' ? 'vid': 'uid');
+  db_query("DELETE FROM {location} WHERE type = '%s' AND eid = %d", $type, $user_or_node->$field);
+}
