[OpenLayers-Users] Feature's attributes
adube at mapgears.com
Thu Oct 23 16:16:07 EDT 2008
I must be close to the answer.
It looks like OL uses this GML portion of the INSERT response right
after the data has been saved to parse the currently null "fid"...
Unfortunately, tinyows currently returns has
<wfs:InsertResult></wfs:InsertResult>, even though the INSERT was a
success. So I'm unable to interact more with the saved feature unless
I refresh the page ( the getFeature parse correctly the fid then ).
Alexandre Dube wrote:
> In the example : feature.fid before INSERT is null, but as something after.
> In my app : feature.fid is null before AND after. But as soon as I
> refresh the page, its has something.
> Alexandre Dube wrote:
>> Hi list,
>> I'm using WFS Protocol to INSERT, DELETE and UPDATE features. So far,
>> I've been able to INSERT geometry and DELETE. Now, I'd like to add some
>> attributes with an html form. I was wondering if there's already
>> something for that in OL, something that takes care of parsing
>> attributes to a feature. I tried feature.attributes['attribute_name'] =
>> "some text" and it works, but doesn't seem ok to me.
>> I also noticed that when I INSERT a new geometry, it doesn't gets its
>> 'gid' attribute. It only appears when I refresh the page. Should that
>> attribute be saved to the feature's attributes at the same time they are
>> INSERTed ? I look the WFS-Transaction example (3) and noticed that
>> there's no 'gid' attribute anywhere...
>> Also, if I (1) INSERT then try immediately to UPDATE, I get an error
>> 500. But if (2) I refresh then UPDATE, no error 500 ( I can go beyond
>> that error, well I get an other one but it doesn't matter right
>> now....) I think it has more something to do with the "fid" in the GML
>> as follow :
>> >(1) My first GML ( that's not working ) has :<ogc:FeatureId/>
>> >(2) My second GML ( working ) has <ogc:FeatureId
>> >(3) And the example has :<ogc:FeatureId fid="restricted.55"/>, even
>> if it has no attributes !
>> Any hints ?
More information about the Users