[OpenLayers-Users] Re: I can't render a WFS in OpenLayers - help!!

Mustafa646 noorcs22 at gmail.com
Mon May 2 11:12:11 EDT 2011


First, How many features are in your wfs service ? if there are several
hundreds, then its not possible. But if less, then it should work, try the
code below, may be you are missing somthing..

 wfs = new OpenLayers.Layer.Vector("wfs layer", {

                    strategies: [new OpenLayers.Strategy.Fixed()],
                   protocol: new OpenLayers.Protocol.WFS({
                       url: "http://localhost:8080/geoserver/wfs",
                       featureType: "Your feature type",
                       featureNS: "http://www.openplans.org/topp"
                       geometryName: "the_geom",
                       schema:
"http://localhost:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&;typename=topp:Your
feature type",
                       srsName: "EPSG:900913", // if u required
                       version: "1.1.0",
                       extractAttributes: true,
                       isBaseLayer: false,
                       visibility: true
                   })

              });



--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/I-can-t-render-a-WFS-in-OpenLayers-help-tp6323821p6324140.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list