Hi Alexandre,<br><br>Thanks for your help. Indeed it was a problem with the namespace. A dummy mistake :)<br><br>Kind regards,<br><br>Hugo Martins<br><br><div class="gmail_quote">On Tue, Jun 30, 2009 at 1:00 PM, Alexandre Dube <span dir="ltr"><<a href="mailto:adube@mapgears.com">adube@mapgears.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Hugo,<br>
<br>
This looks like a feature namespace problem. See the Format.XML readNode function, put a break point at line :<br>
<br>
var group = this.readers[this.namespaceAlias[node.namespaceURI]];<br>
<br>
This might be the problem,<br>
<br>
Alexandre<br>
<br>
Hugo wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
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" target="_blank">http://isegi.dyndns.org:8080/geoserver/wfs</a>?",<br>
featureNS : "<a href="http://isegi.dyndns.org:8080/sigla" target="_blank">http://isegi.dyndns.org:8080/sigla</a>",<br>
featureType: "explor",<br>
geometryName: "the_geom",<br></div>
schema: "<a href="http://isegi.dyndns.org:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=sigla:explor" target="_blank">http://isegi.dyndns.org:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=sigla:explor</a> <<a href="http://isegi.dyndns.org:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=sigla:explor" target="_blank">http://isegi.dyndns.org:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=sigla:explor</a>>",<div class="im">
<br>
format: new OpenLayers.Format.WFST.v1_1_0({<br>
featureType: 'explor',<br>
featureNS: "<a href="http://isegi.dyndns.org:8080/sigla" target="_blank">http://isegi.dyndns.org:8080/sigla</a>",<br>
featurePrefix: 'sigla',<br>
geometryName: 'the_geom'<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" target="_blank">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" target="_blank">http://isegi.dyndns.org:8080/sigla</a>',<br>
geometryName: "the_geom",<br>
projection: wgs,<br>
extractAttributes: true,<br></div>
schema: "<a href="http://isegi.dyndns.org:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=sigla:explor" target="_blank">http://isegi.dyndns.org:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=sigla:explor</a> <<a href="http://isegi.dyndns.org:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=sigla:explor" target="_blank">http://isegi.dyndns.org:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=sigla:explor</a>>"<div class="im">
<br>
}<br>
);<br>
<br>
Thanks in advance.<br>
Kind regards,<br>
<br>
Hugo Martins<br></div>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openlayers.org" target="_blank">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
<br>
</blockquote>
<br>
<br>
-- <br>
Alexandre Dubé<br>
Mapgears<br>
<a href="http://www.mapgears.com" target="_blank">www.mapgears.com</a><br>
<br>
</blockquote></div><br>