[OpenLayers-Users] Can I prevent OpenLayers from losing my WFS-T feature edits?

Andreas Hocevar ahocevar at opengeo.org
Sat Mar 23 00:32:30 PDT 2013


A workaround is to configure a bigger ratio (e.g. 2) for the
OpenLayers.Strategy.BBOX, which means that a larger extent of features
is loaded with every GetFeature request. Another strategy that I've
been using is to display the layer using WMS, and use the GetFeature
control to only "check out" the clicked feature for editing. Then you
can use before* listeners to ask the user if they want to save when
another feature was clicked, or you can disable the GetFeature control
until editing is done.

Andreas.

On Thu, Mar 21, 2013 at 4:03 PM, jannesm <jannesm at iki.fi> wrote:
> Using openlayers (2.12) and drawing some vector features against a WFS-T
> interface (offered by geoserver).
>
> Problem is, when I draw some geometries and pan a little bit too much
> without saving the edits yet, openlayers sends wfs:getFeature message to
> WFS-T interface, and while doing this it resets all features I have drawn so
> far.
>
> You can try this even using the public openlayers examples:
> http://openlayers.org/dev/examples/wfs-protocol-transactions.html
>
> draw some features
> pan / zoom around enough / too much before saving
> the features you drew disappear
> Any way to prevent this?
>
>
>
> --
> View this message in context: http://osgeo-org.1560.n6.nabble.com/Can-I-prevent-OpenLayers-from-losing-my-WFS-T-feature-edits-tp5042133.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.


More information about the Users mailing list