[OpenLayers-Users] Feature's attributes
adube at mapgears.com
Thu Oct 23 14:58:53 EDT 2008
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