<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Hi,<br><br>thanks for your suggestion!<br>Name of the layer is correct. I use featureType: "mylayer" (without prefix) and/or <span>typename: "gn:mylayer" but neither worked.</span><br>Firebug gave me:<br> gml:boundedby ><gml:null>unknown</gml:null><br>I think because of different EPSG/coordinates. But don´t know how to manage best way.<br><br>best regards<br>Sarah<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;"></span></b><br></font><br>Hello,<br><br>What is the name of your layer in the Server? You don't seem to be passing that to the layer constructor. Do 2
things:<br><br>. confirm in the server the layer's name and that there's nothing wrong with it (accessing the demos at Geoserver);<br>
<br>. try a simpler layer setup like the following in a map with the same SRS:<br><br>var wfs2 = new OpenLayers.Layer.WFS(
<br> "myLayer",
<br> "<span><a rel="nofollow" target="_blank" href="http://myserver:81/geoserver/wfs">http://myserver:81/geoserver/wfs</a></span>",
<br> {
<br> typename: 'myLayersNameInTheServer',
<br> }
<br> );<br><br> If it shows as expected you can try to build it up from there.<br><br>Good luck,<br><br>Luís<br><br><br><div class="gmail_quote">On Mon, Mar 8, 2010 at 3:32 PM, Sarah Schuessler <span dir="ltr"><<a rel="nofollow" ymailto="mailto:sarah_flip@yahoo.de" target="_blank" href="mailto:sarah_flip@yahoo.de">sarah_flip@yahoo.de</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;"><div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div>Hi list,<br><br>I want to display a wfs layer but I get only a firebug response.<br>My code:<br>var wfs2 = new OpenLayers.Layer.Vector("WFS_", <br> {strategies: [new OpenLayers.Strategy.BBOX()],<br>
projection: new OpenLayers.Projection("EPSG:4326"), <br><span> protocol: new OpenLayers.Protocol.WFS({url: "<a rel="nofollow" target="_blank" href="http://myserver:81/geoserver/wfs">http://myserver:81/geoserver/wfs</a>", </span><br>
<span> featureNS: "<a rel="nofollow" target="_blank" href="http://geonetwork-opensource.org">http://geonetwork-opensource.org</a>",</span><br> featureType: "mylayer", <br> geometryName: "SHAPE", <br>
srsName: "EPSG:4326",<br> version: "1.0.0"})<br> });<br><br>This is my respone:<br><code><span style="font-size: 10pt;"><span>unknown5413933.11245331994.98768227296000555128200312150128202450mylayer
2450
3543559.9964835386316.2988641998-12-15T00:00:00.8192005-11-21T00:00:00.819
2005-11-21T00:00:00.81963541658.27,5388303.67 3541634.73,5388307.71
3541619.75,5388285.51 3541602.55,5388279.83 3541596.081,5388247.895
3541594.57,5388243.972 3541590.42,5388232.1 3541589.45,5388229.34
3541586.61,5388202.45 3541577.424,5388201.4 3541576.61,5388191.43
3541572.56,5388165.36 3541569.52,5388146.47 3541488.02,5388172.96
3541484,5388174.3 </span></span></code>...<br><br>Post:<br><pre><code><span lang="EN-GB"><span><a rel="nofollow" target="_blank" href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</a> <a rel="nofollow" target="_blank" href="http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd">http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd</a> </span><br>
<span><a rel="nofollow" target="_blank" href="http://geonetwork-opensource.org">http://geonetwork-opensource.org</a> <a rel="nofollow" target="_blank" href="http://myserver:81/geoserver/wfs/DescribeFeatureType?version=1.0.0&typename=gn:Erholungswald">http://myserver:81/geoserver/wfs/DescribeFeatureType?version=1.0.0&typename=gn:Erholungswald</a>" xmlns:xsi="<a rel="nofollow" target="_blank" href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>"></span><br>
<span>SHAPE</span><br><span>9.2809876852504,48.409352045852 9.7190123147496,48.590647954148</span></span></code></pre><br><br>In fact that I have problems with OpenLayers.Control.GetFeature (to select features) I found out that I need to use other coordinates (Gauß
Krüger) and only version 1.0.0 (version 1.1.0 gave me exception:
<p class="MsoNormal"><span lang="EN-GB">ows:Exception
exceptionCode="NoApplicableCode"><ows:ExceptionText>java.lang.RuntimeException:
Encode</span></p>
<p class="MsoNormal"><span lang="EN-GB"><span> </span>failed for numberOfFeatures. Cause: Value</span></p>
<p class="MsoNormal"><span lang="EN-GB"><span> </span>&apos;-1&apos; must be
non-negative (0 or</span></p>
<p class="MsoNormal"><span lang="EN-GB"><span> </span>above). Encode failed for
numberOfFeatures. Cause:</span></p>
<p class="MsoNormal"><span lang="EN-GB"><span> </span><span>
</span>Value &apos;-1&apos; must be non-negative (0</span></p>
<p class="MsoNormal"><span lang="EN-GB"><span> </span>or above). Value &apos;-1&apos;
must be</span></p>
<span style="font-size: 12pt;" lang="EN-GB"><span> </span></span><span style="font-size: 12pt;">non-negative (0 or above).</span>. )<br>
<br>If I use:<br><span>var wfs2 = new OpenLayers.Layer.WFS("WFS_", "<a rel="nofollow" target="_blank" href="http://myserver:81/geoserver/wfs">http://myserver:81/geoserver/wfs</a>", {typename: "gn:mylayer", maxfeatures: 15},{featureClass: OpenLayers.Feature.WFS});</span><br>
there is a request string with false bbox, so I need to reproject. I tried it with srsName and projection but nothing worked. I read something about format instead of featureClass but don´t know how to.<br><br>I work with win server 2003. I put code at root of geoserver.<br>
Where are my mistake(s)? Any hints are welcome!<br><br>Thanks!<br>best regards<br>Sarah<br></div><div class="hm">
</div></div><div class="hm"><br>__________________________________________________<br>Do You Yahoo!?<br>Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. <br><a rel="nofollow" target="_blank" href="http://mail.yahoo.com">http://mail.yahoo.com</a> </div>
</div><br>_______________________________________________<br>
Users mailing list<br>
<a rel="nofollow" ymailto="mailto:Users@openlayers.org" target="_blank" href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
<a rel="nofollow" target="_blank" href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a><br>
<br></blockquote></div><br>
</div></div>
</div><br>__________________________________________________<br>Do You Yahoo!?<br>Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. <br>http://mail.yahoo.com </body></html>