Hi,

thanks for your suggestion!
Name of the layer is correct. I use featureType: "mylayer" (without prefix) 
and/or typename: "gn:mylayer" but neither worked.
Firebug gave me:
 gml:boundedby ><gml:null>unknown</gml:null>
I think because of different EPSG/coordinates. But don´t know how to manage 
best way.

best regards
Sarah




________________________________


Hello,

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:

. confirm in the server the layer's name and that there's nothing wrong with it 
(accessing the demos at Geoserver);

. try a simpler layer setup like the following in a map with the same SRS:

var wfs2 = new OpenLayers.Layer.WFS( 
                "myLayer",  
                "http://myserver:81/geoserver/wfs";, 
                { 
                 typename: 'myLayersNameInTheServer', 
                } 
            );

If it shows as expected you can try to build it up from there.

Good luck,

Luís



On Mon, Mar 8, 2010 at 3:32 PM, Sarah Schuessler <sarah_f...@yahoo.de> wrote:

Hi list,
>
>I want to display a wfs layer but I get only a firebug response.
>My code:
>var wfs2 = new OpenLayers.Layer.Vector("WFS_", 
>                {strategies: [new OpenLayers.Strategy.BBOX()],
>>                projection: new OpenLayers.Projection("EPSG:4326"), 
>                protocol: new OpenLayers.Protocol.WFS({url: 
> "http://myserver:81/geoserver/wfs";, 
>                    featureNS: "http://geonetwork-opensource.org";,
>                    featureType: "mylayer", 
>                    geometryName: "SHAPE", 
>>                    srsName: "EPSG:4326",
>                    version: "1.0.0"})
>                });
>
>This is my respone:
>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 ...
>
>Post:
>
>http://www.opengis.net/wfs 
>http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd 
>http://geonetwork-opensource.org 
>http://myserver:81/geoserver/wfs/DescribeFeatureType?version=1.0.0&typename=gn:Erholungswald";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>SHAPE
>9.2809876852504,48.409352045852 9.7190123147496,48.590647954148
>
>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: 
>
>
>
>
>
>
>ows:Exception
>exceptionCode="NoApplicableCode"><ows:ExceptionText>java.lang.RuntimeException:
>Encode
>      failed for numberOfFeatures. Cause: Value
>      &apos;-1&apos; must be
>non-negative (0 or
>      above). Encode failed for
>numberOfFeatures. Cause:
>     
>Value &apos;-1&apos; must be non-negative (0
>      or above). Value &apos;-1&apos;
>must be      non-negative (0 or above).. )
>
>If I use:
>var wfs2 = new OpenLayers.Layer.WFS("WFS_", 
>"http://myserver:81/geoserver/wfs";, {typename: "gn:mylayer", maxfeatures: 
>15},{featureClass: OpenLayers.Feature.WFS});
>>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.
>
>I work with win server 2003. I put code at root of geoserver.
>>Where are my mistake(s)? Any hints are welcome!
>
>Thanks!
>best regards
>Sarah
>
>
>__________________________________________________
>Do You Yahoo!?
>Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen 
>Massenmails. 
>http://mail.yahoo.com 
>_______________________________________________
>>Users mailing list
>Users@openlayers.org
>http://openlayers.org/mailman/listinfo/users
>
>


__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen 
Massenmails. 
http://mail.yahoo.com 
_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users

Reply via email to