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
24503543559.9964835386316.2988641998-12-15T00:00:00.8192005-11-21T00:00:00.8192005-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
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to