[Geoserver-users] WFS not displayed in OpenLayers map while WMS is displayed

Hi,
I have installed Geoserver on my local computer. I cannot display a WFS
layer while the WMS is displaying. What am I doing wrong?

The following WMS is shown on the map:
WMS_Layer = new OpenLayers.Layer.WMS( "WMS Layer",
"http://localhost:8080/geoserver/wms",
{layers: 'topp:tasmania_roads', transparent: 'true'}, {opacity: .2});

The following WFS is not shown whereas it is the same layer as the WMS:
WFS_Layer = new OpenLayers.Layer.Vector("WFS Layer", {
    strategies: [new OpenLayers.Strategy.BBOX()],
    protocol: new OpenLayers.Protocol.WFS({
        url:"http://localhost:8080/geoserver/wfs",
        featureType: "tasmania_roads",
        featureNS: "http://www.openplans.org/topp"
        })
    });

Thanks for your reply.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WFS-not-displayed-in-OpenLayers-map-while-WMS-is-displayed-tp5129879.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hey Pierre,

You probably need to set up a proxy for OpenLayers.

Check this out: OpenLayers Proxy FAQ
<http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#ProxyHost&gt;

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WFS-not-displayed-in-OpenLayers-map-while-WMS-is-displayed-tp5129879p5129986.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Exactly. Thanks for the answer.
P.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WFS-not-displayed-in-OpenLayers-map-while-WMS-is-displayed-tp5129879p5131424.html
Sent from the GeoServer - User mailing list archive at Nabble.com.