[OpenLayers-Users] wfs response.features empty

Sarah Schuessler sarah_flip at yahoo.de
Tue Mar 23 04:39:14 EDT 2010


Hi list,

I want to load a wfs layer in my map.
var wfs = new OpenLayers.Layer.Vector("wfs",
    {styleMap: styleMap, 
    strategies: [new OpenLayers.Strategy.Fixed()],
    protocol: new OpenLayers.Protocol.WFS({
            url: "http://myserver:81/geoserver/wfs?",
            featureNS: "gn",
            featureType: "mylayer",
            geometryName: "SHAPE",
            version: "1.1.0",
            srsName: "EPSG:4326"
    }),
    projection: new OpenLayers.Projection("EPSG:4326") //like my map
    });

But I can see a response at firebug but response.features is empty:
wfs.protocol.read({
    callback: function(response){
        if(response.success(){
            var features = response.features; //is empty
        } else {
            alert("failure!)
        }
    }
});
My code is at geoservers www folder (geoserver is at Tomcat 6 on win).
FeatureInfo works fine.
Is this a matter of proxyhost?

Thanks.
best regards
Sarah


__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. 
http://mail.yahoo.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100323/acef9ae2/attachment.html


More information about the Users mailing list