Hello all,<br><br>I'm having troubles to implement a vector layer with WFS protocol. From firebug i can see that the attributes from the layer are extracted, however no vector feature is displayed in the map.<br>DO you have any suggestions??? My code is as follows:<br>
<br>var saveStrategy = new OpenLayers.Strategy.Save();<br> var wfs2 = new OpenLayers.Layer.Vector(<br> "ExplorWFS2",<br> {<br> strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],<br>
projection: wgs,<br> protocol: new OpenLayers.Protocol.WFS({<br> version: "1.1.0",<br> srsName: "EPSG:4326",<br> url: "<a href="http://isegi.dyndns.org:8080/geoserver/wfs">http://isegi.dyndns.org:8080/geoserver/wfs</a>?",<br>
featureNS : "<a href="http://isegi.dyndns.org:8080/sigla">http://isegi.dyndns.org:8080/sigla</a>",<br> featureType: "explor",<br> geometryName: "the_geom",<br>
schema: "<a href="http://isegi.dyndns.org:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=sigla:explor">http://isegi.dyndns.org:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=sigla:explor</a>",<br>
format: new OpenLayers.Format.WFST.v1_1_0({<br> featureType: 'explor',<br> featureNS: "<a href="http://isegi.dyndns.org:8080/sigla">http://isegi.dyndns.org:8080/sigla</a>",<br>
featurePrefix: 'sigla',<br> geometryName: 'the_geom'<br> })<br> }) <br> }<br> );<br><br>I have tried these code with and without the format option.<br>
<br>If i simply use the following code, everything goes perfect and vector features are displayed in the map:<br><br>var wfs = new OpenLayers.Layer.WFS(<br> "ExplorWFS",<br> "<a href="http://isegi.dyndns.org:8080/geoserver/wfs">http://isegi.dyndns.org:8080/geoserver/wfs</a>?",<br>
{typename: 'sigla:explor'},<br> {<br> featureVersion: "1.0.0",<br> typename: 'explor',<br> featureNS: '"<a href="http://isegi.dyndns.org:8080/sigla">http://isegi.dyndns.org:8080/sigla</a>',<br>
geometryName: "the_geom",<br> projection: wgs,<br> extractAttributes: true,<br> schema: "<a href="http://isegi.dyndns.org:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=sigla:explor">http://isegi.dyndns.org:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=sigla:explor</a>"<br>
}<br> );<br><br>Thanks in advance.<br>Kind regards,<br><br>Hugo Martins<br>