[OpenLayers-Users] Inserting a vector feature with attributes
Dave Potts
dave.potts at pinan.co.uk
Sat Nov 5 14:37:34 EDT 2011
hi
I working with openlayers application connect via geoserver to a postgis
database.
I have created a vector featore object, set several attributes, set the
status to INSERT and invoked a save stratgy.
This has the result that a object is create in the postgis database with
the correct geometry, but all of the attribute information is ignored.
Q. Is it possible to do an insert with attributes?
The code from Format/WFST/v1.js at line 309 reads
"Insert": function(obj) {
var feature = obj.feature;
var options = obj.options;
var node = this.createElementNSPlus("wfs:Insert", {
attributes: {
handle: options && options.handle
}
});
this.srsName = this.getSrsName(feature);
this.writeNode("feature:_typeName", feature, node);
return node;
Which looks like its getting its attribute information from options
object, is this correct?
I thought it would get its innfromation from the this.attribute object!
regards
Dave.
--
More information about the Users
mailing list