Possible Duplicate:
Problems with OpenLayers and WFS - proxy.cgi issues
I have a problem with a simple OpenLayers web page. I have two layers, first one is a WMS layer and work perfectly on QGIS and OpenLayers but the second WFS layer (tasmania_road) works on QGIS but it doesn't work on OpenLayers. I simply show two layer with WFS tasmania_road on top of the WMS layer. My code shown below.
<html>
<head>
<script type="text/javascript">
var map;
function init() {
OpenLayers.ProxyHost = "proxy.cgi?url=";
map = new OpenLayers.Map('rcp1_map');
var wms = new OpenLayers.Layer.WMS(
"OpenLayers WMS", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{ layers: 'basic' }
);
var layer = new OpenLayers.Layer.Vector("WFS", {
strategies: [new OpenLayers.Strategy.BBOX()],
protocol: new OpenLayers.Protocol.WFS({
url: "http://demo.opengeo.org/geoserver/wfs",
featureType: "tasmania_roads",
featureNS: "http://www.openplans.org/topp"
})
});
map.addLayer(wms);
map.addLayers([wms, layer]);
map.setCenter(new OpenLayers.LonLat(146.7, -41.8), 6);
}
</script>
</head>
<body onload="init()">
<div id="rcp1_map" style="width: 100%; height: 100%;">
</div>
</body>
</html>