Christopher Schmidt wrote:
On Fri, Mar 14, 2008 at 10:50:46AM +0100, Rinke Heida wrote:
  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
In order to get WFS Delete to work I changed OpenLayers/Format/WFS.js.<br>
For some reasen in the remove section other properties are used as with
Update and Insert:<br>
feature.attribures.fid &lt;-&gt; feature.fid<br>
this.featureNS &lt;-&gt; this.wfsns<br>
I changed these things and after that a feature was really deleted from
the database!<br>
Probably the same result is achieved if you set these properties in
your own script, but for me the test was whether it could work and than
what would happen.<br>
    

Yeah, this is fixed in OpenLayers trunk. Simply an oversight in the code
until now. Thanks for the email though.

  
Glad it will be fixed in a coming release
Actually I was looking for a way to delete only the geometry or empty
the geometry but can't get that to work yet, because in my situation
other attributes than geometry have to be kept in the database.<br>
<br>
    

I have no idea how to do this: I think what you actually want to do is
an update, with a null geom: OpenLayers probably doesn't do that well,
but if you figure out a way to do it, and want the code in OL, please
let us know :) 
  
I figured out to write an empty value node
     valueNode.appendChild(this.createTextNode(""));
when this.geometry is null instead of:
     valueNode.appendChild(this.buildGeometryNode(feature.geometry));
because buildGeometryNode doesn't like a null geometry.

However, it doesn't take me anywhere because I suspect GeoServer can't handle a NULL geometry at all (not for reading and not for writing).
(We use an Oracle Spatial database and the GEOM column is nullable, so that's not the problem. Also with SQL it's no problem to set GEOM to null.)

Rinke
Regards,
  
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to