[OpenLayers-Users] WMS Layer Displayed but WFS not ?

Mustafa646 noorcs22 at gmail.com
Thu Mar 3 04:41:43 EST 2011


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-tp6084180p6084180.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list