[OpenLayers-Users] vector layers not shown with geoserver

Gilberto Ramos sdjbm17 at gmail.com
Fri Jul 16 10:26:33 EDT 2010


Hi there,

Try something like this:


    var wfs = new OpenLayers.Layer.Vector("wfs", { 
        strategies: [new OpenLayers.Strategy.BBOX()],
        projection: new OpenLayers.Projection("EPSG:4326"),
        protocol: new OpenLayers.Protocol.WFS({
            version: "1.1.0",
            srsName: "EPSG:4326",
            url: "http://192.168.224.128:8080/geoserver/wfs", 
            featureType: "khasra", 
            featureNS: "http://192.168.224.128:8080/geoserver", 
            schema:
"http://192.168.224.128:8080/geoserver/wfs?service=wfs&version=1.1.0&request=DescribeFeatureType&typename=CHANGETHIS:khasra",
            featurePrefix: "CHANGETHIS"
        }) 
    }); 


Obs.: The CHANGETHIS part you can look at the Preview Layers section in
GeoServer Admin..

Cheers,

Gilberto Ramos

-----
"For God so loved the world, that he gave his only begotten Son, that
whosoever believeth in him should not perish, but have everlasting life.
For God sent not his Son into the world to condemn the world; but that the
world through him might be saved.
He that believeth on him is not condemned: but he that believeth not is
condemned already, because he hath not believed in the name of the only
begotten Son of God." John 3:16-18
-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/vector-layers-not-shown-with-geoserver-tp5301640p5302162.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list