On Wed, Sep 16, 2009 at 10:47 AM, Marco Scheuble <[email protected]> wrote:
>
> Hi list,
>
> I'm having troubles with catching the success event, when saving a wfs
> layer.
> Saving and everything works fine, but I don't know, how to register/catch
> this event!
>
> here is some code:
>
> saveStrategy = new OpenLayers.Strategy.Save();
>
> var poly  = new OpenLayers.Layer.Vector( 'Flächen', {
>        strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy ],
>        projection: gk,
>        styleMap: styles,
>        protocol: new OpenLayers.Protocol.WFS({
>                version: '1.1.0',
>                srsName: 'EPSG:31467',
>                url: '/geoserver/wfs',
>                featureNS :  'http://www.openplans.org/topp',
>                featureType: 'poly',
>                geometryName: 'the_geom'})
>        });
>
> and now there must be s.th. like this:
>
> ??.events.on({"success": message})
> function message(event){...}
>
> but i don't know what exactly to write

saveStrategy.events.on({
   success: function(evt) {
       var response = evt.response;
       var features = response.features;
   }
});

Hope this helps,

-- 
Eric Lemoine

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

Tel : 00 33 4 79 44 44 96
Mail : [email protected]
http://www.camptocamp.com
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to