[OpenLayers-Users] How to update the attributes for a vector feature downloag via WFS-T, setting the state flag.

Eric Lemoine eric.lemoine at camptocamp.com
Thu Dec 15 02:20:15 EST 2011


On Wed, Dec 14, 2011 at 10:10 PM, Dave Potts <dave.potts at pinan.co.uk> wrote:
>
> Hi list,
>
> A quick question
>
> If I want to update the attribute values for a vector feature object that
> I have download from a WFS-T data source what is the offical way of doing
> it?
>
> >From looking at the source code of openlayers O2.11, it seems that the
> state flag of vector feature object must be in state UPDATE, but there
> does not seem to be a way of setting this flag by making an offical API
> call.
>
> All vector feature objects are created with the state flag set to null.
>
> The only function that updates is toState, which ignores request to set
> the STATE flag to update.
>
> The modifiy feature control updates the state setting by just writing to
> it directly. But I don't want to modify the shape of my feature object.
>
> If I  set the flag directly to UPDATE and call the save stratgy, every
> works as you would expect.
>
> So how should I set the state flag?

Hi

The way you do it is the only way currently. The patch attached to
#3016 addresses this. You want to verify but I think it fixes the
issue you've observed with toState. I'm interested to see this ticket
moving forward.

Cheers,


#3016 <http://trac.osgeo.org/openlayers/ticket/3016>

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com


More information about the Users mailing list