OpenLayers – Syntax of WFS Request in OpenLayers

javascriptopenlayers-2wfs

I am in need of the correct syntax for loading WFS layer using OpenLayers. I have gone through many examples on the OpenLayers site and other examples, but can't figure out how to use the necessary and optional options like strategies, protocols etc

Best Answer

Where is somethin like

var wfsLayer = new OpenLayers.Layer.Vector({
    protocol: new OpenLayers.Protocol.WFS({
        url: 'http://example.com/wfs',
        featureType: 'myFeatureTypeName',
        featureNS: 'topp',
        geometryName: 'the_geom'
    }),
    strategies: [ new OpenLayers.Strategy.BBOX() ]
});

getting you? Can you see any GetFeature-Request in Firebug or Inspector? Have you set up your OpenLayers.ProxyHost variable?