You need a proxy for requesting WFS-Servers. http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions
regards Tino ----- Original Nachricht ---- Von: Mustafa646 <[email protected]> An: [email protected] Datum: 03.03.2011 10:41 Betreff: [OpenLayers-Users] WMS Layer Displayed but WFS not ? > I want to display shapefile layer over google map. Below is the code for > displaying both WMS and WFS > > 1. var wmslayer = new OpenLayers.Layer.WMS("buildings1", > "http://localhost:8080/geoserver/wms", { 'layers': 'topp:buildings', > 'format': 'image/png', 'transparent': 'true' }, {'opacity': > 1.0,'isBaseLayer': false, 'visibility': true }); > > 2. wfs = new OpenLayers.Layer.Vector("buildings2", { > strategies: [new OpenLayers.Strategy.BBOX()], > protocol: new OpenLayers.Protocol.WFS({ > url: "http://localhost:8080/geoserver/wfs", > featureType: "buildings", > featureNS: "http://www.openplans.org/topp", > srsName: "EPSG:900913", > version: "1.1.0", > isBaseLayer: false, > visibility:true > }) > }); > > WMS layer successfully displayed over Google Map, but WFS not. Can anybody > explain whats wrong with WFS layer or above code?. I have publish the > exactly same shapefile (buildings) under topp workspace in Geoserver. > > I could not understand, what is wrong ? need reply immediately! > > best regards > > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/WMS-Layer-Displayed-but-WFS-not-tp608 > 4180p6084180.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/openlayers-users > _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
