<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi Alexandre,<br>
<br>
Thank you! Works :-)<br>
<br>
<br>
<br>
<br>
Em 23-07-2013 16:38, Alexandre Dubé escreveu:<br>
</div>
<blockquote cite="mid:51EEA380.40008@mapgears.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">Hi Pedro,<br>
<br>
If you look at the XML returned, you'll see this namespace
definition: xmlns:ms=<a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="http://mapserver.gis.umn.edu/mapserv">"http://mapserver.gis.umn.edu/mapserv"</a>,
and more below inside the <gml:featureMember> tag there
are tags that use the 'ms' prefix. This has to be set in your
wfs protocol definition:<br>
<br>
featurePrefix: "ms", // default is 'feature'<br>
featureNS: <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="http://mapserver.gis.umn.edu/mapserv">"http://mapserver.gis.umn.edu/mapserv"</a>,
// default is '<a moz-do-not-send="true"
class="moz-txt-link-freetext" href="http://localhost/">http://localhost/</a>'
if I remember correctly<br>
<br>
You could also set those on the server side to make mapserver
return the default values for openlayers. It's in the MAP WEB
METADATA object, add:<br>
<br>
"wfs_namespace_prefix" "feature"<br>
"wfs_namespace_uri" <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E" href="http://localhost/">"http://localhost/"</a><br>
<br>
HTH,<br>
<br>
Alexandre<br>
<br>
<br>
On 13-07-23 11:09 AM, Pedro Costa wrote:<br>
</div>
<blockquote cite="mid:51EE9CB2.30207@sapo.pt" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<font face="Arial">Hi guys,<br>
<br>
I have on wfs from mapserver. I have made an GetCapabilities,
tried in qgis also and works fine.<br>
My data in postgis are in epsg:27493 and i reproject for
900913 with mapserver. I see bounding box with GetFeature
request and also its fine.<br>
My problem is that i can't see nothing from my layer in
openlayers client...In [2] are my openlayers code.<br>
If I go to response tab in firebug its all rigth also [see
ss1].<br>
But if i execute in javascript console
'my_layer_name.features.length' i get 0 features.<br>
I don't know the problem. Can anybody help me with that?<br>
<br>
Thanks<br>
<br>
Pedro<br>
<br>
[ss1] <a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://img855.imageshack.us/img855/8236/r4vh.png">http://img855.imageshack.us/img855/8236/r4vh.png</a><br>
<br>
[2] <a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://pastebin.com/ZUaHbq0h">http://pastebin.com/ZUaHbq0h</a><br>
</font> <br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/openlayers-users">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Alexandre Dubé
Mapgears
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="http://www.mapgears.com">www.mapgears.com</a>
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/openlayers-users">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a>
</pre>
</blockquote>
<br>
</body>
</html>