[OpenLayers-Users] wfs not displaying

Sarah Schuessler sarah_flip at yahoo.de
Tue Mar 9 11:28:47 EST 2010


Hi,

I tried to make it work, but my wfs layer won´t be displayed.
I got a respone at firebug (if I use projection: "EPSG:900913" but even if I use no projection, only with EPSG: 31467 I got no features back). 
If I use these lines:

var ddBounds = new OpenLayers.Bounds(
        -73.839111,40.287907,-68.214111,44.441624
    );
    map.zoomToExtent(
        ddBounds.transform(geographic, mercator)
    );
(modified: switched geographic and mercator at transform() because my map has geographic projection and some mercator bounds)I got an error saying this.baselayer is null ( tried to set different baselayers and changed some code but I didn´t get it working).

Same behaviour like my selectionControl, where I get response/features but they won´t displayed at my select vector layer.

Any further hints about that?
Thanks
best regards
Sarah




________________________________


Hi,

I think the best way to do this is by performing the reprojection client-side (if I lead you otherwise it wasn't my intention - sorry). Just config the layer at Geoserver with its native EPSG without any modifications. This way you should get the layer with no problems at the demo page. 

Then at client-side the layer must be reprojected to the map's SRS. Use this example to guide you:

http://openlayers.org/dev/examples/wfs-reprojection.html

Hope it helps,

Luís


2010/3/8  <>

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
>


__________________________________________________
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/20100309/e6a23565/attachment.html


More information about the Users mailing list