[OpenLayers-Users] WFS layer - commit works, save strategy from WFSProtocol does not work!!!! POST vs GET ?!?!

Christoph Ratke christoph.ratke at gmx.net
Mon Mar 22 09:22:10 EDT 2010


Hi Poul,
you could try a cast like this:

// --- snip ---
var drawPoint = new OpenLayers.Control.DrawFeature(
                            punto, OpenLayers.Handler.Point,
                            {displayClass: 'olControlDrawFeaturePoint'}
                        );
                        drawPoint.featureAdded = function(feature) {
                            feature.layer.eraseFeatures([feature]);
                            // cast to multipoint
                            feature.geometry = new
            OpenLayers.Geometry.MultiPoint(
                                feature.geometry
                            );
                            feature.style.strokeColor = "#0000ff";
                            feature.state = OpenLayers.State.INSERT;
                            feature.layer.drawFeature(feature);
                        }
// --- snap


paweluz schrieb:
> Hi Ramon
>
> Thanks for your help but unfortunately it still does not work for me. 
> My layer definition looks like this right now...
>
> 	var  wfsproba = new OpenLayers.Layer.Vector("Editable Features", {
>         strategies: [new OpenLayers.Strategy.BBOX(),saveStrategy],
>         projection: new OpenLayers.Projection("EPSG:4326"),
> 	styleMap: wfs_style, 
>         protocol: new OpenLayers.Protocol.WFS({
>             version: "1.1.0",
>             srsName: "EPSG:4326",
>             url: "/geoserver/wfs",
>             featureNS :  "http://www.openplans.org/topp",
>             featureType: "probabaza",
>             geometryName: "the_geom",
>             schema:
> "http://localhost:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=topp:probabaza",
> 	    featurePrefix: "topp"
>         })
>     }); 
>
>
> I have a question for you...
>
> Did you save Line or polygons into your database?
> Can you please provide your request??
>
> It would be very helpful for me...
>
> Thanks
> Poul
>   




More information about the Users mailing list