1

I am using following code to save feature but that is not working for Line feature and Polygon feature to save new feature on the relevant layer type. But the same code is working on Point feature ( after changing of Handler type).

drawline=  new OpenLayers.Control.DrawFeature(wfs_layer, OpenLayers.Handler.Path, {
});

modifyFeatureControl = new OpenLayers.Control.ModifyFeature(wfs_layer, {
});

map.addControl(modifyFeatureControl);

drawline.events.register("featureadded", this, function(e) {
        FeatureObject=e.feature;
        console.log(FeatureObject);
        modifyFeatureControl.selectFeature(e.feature);

        modifyFeatureControl.activate();
        saveStrategy.save();
        modifyFeatureControl.deactivate();
        drawline.deactivate();
});
map.addControl(drawline);
drawline.activate();

Edit:

following is my WFS transaction

http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 151.1367417453871 -33.72644189139304 151.14000331155546 -33.73500768904365 151.14322196237302 -33.72993969538848 151.1367417453871 -33.72644189139304 151.14686976662688 -33.72688804779375 151.14729892007222 -33.73152793687197 151.15081797830058 -33.72856557510649 151.15081797830058 -33.72856557510649 151.14686976662688 -33.72688804779375 Source

  • Capture the WFS transaction that your application is sending and what the server is sending back. – user30184 Sep 20 '14 at 13:19
  • Can you please let me know how can I capture the WFS transaction, as I am new on this – user34591 Sep 20 '14 at 13:54
  • This is not really my area but Firebug should show them. – user30184 Sep 20 '14 at 14:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.