[OpenLayers-Users] WFS using OpenLayers.Layer.Vector() fails to render

gingerbbm stuart.jones at jacobs.com
Fri May 14 20:23:29 EDT 2010


Figured it out. I suspected it would be something simple, and it was: I just
needed to remove the trailing slash from the featureNS value:

    var wfslayer = new OpenLayers.Layer.Vector("WFS", { 
        strategies: [new OpenLayers.Strategy.BBOX()], 
        protocol: new OpenLayers.Protocol.WFS({ 
            url: "http://d2.elgin.gov.uk/geoserver.2/wfs", 
            featureType: "NSG_STREET_PUBLIC", 
            featureNS: "http://www.elgin.gov.uk",                    // <--
removed trailing slash 
            featurePrefix: "e", 
            geometryName: "GEOM" 
        }) 
    }); 
    map.addLayer(wfslayer);

It would be nice if OL was a bit more forgiving!
-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/WFS-using-OpenLayers-Layer-Vector-fails-to-render-tp5046572p5057688.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list