[OpenLayers-Users] wfs not displaying

Sarah Schuessler sarah_flip at yahoo.de
Mon Mar 8 12:53:30 EST 2010


Hi,

I tried to alter srs code at geoserver from 31467 to 4326. If I use option "reproject" at geoserver gui I can see my layer from geoserver demo page (if I use "force declared" or "keep native" I could not even see my layer). But if I want to make a getfeature request I get an exception:
error occured getting features Had troubles handling filter reprojection..could not decode srs 'http://www.opengis.net/gml/srs/epsg.xml#4326' null ... 
I thought I could force geoserver to use epsg 4326 at my request with my OL code, but as you said I have to manage it geoserver side...?
Any further hints about that?


Thanks.
best regards
Sarah


________________________________


HI again,

Indeed it seems that the request is for a region that
doesn't exist in the server (due to the wrong SRS). Assuming that there's nothign wrong with the layer in the server you could try to add the EPSG
to the layer constructor:

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

If it still doesn't show up then there must be some problem re-projecting the layer to the map's SRS.

Good luck,

Luís






2010/3/8 Sarah Schuessler <sarah_flip at yahoo.de>
>
>
>>>
>>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
>>


__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. 
http://mail.yahoo.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100308/36da9999/attachment.html


More information about the Users mailing list