[Users] Re. WFS Layer

Sarah Schuessler sarah_flip at yahoo.de
Wed Jul 21 15:56:12 CEST 2010


Hi,

you have to use somethiong like that:
wfs  =  new OpenLayers.Layer.Vector("mylayer", 
                { styleMap: wfsStyle,         
                 strategies: [new OpenLayers.Strategy.Fixed(), ],
                projection: destproj,                
                protocol: new OpenLayers.Protocol.WFS({                 
                    url: "http://myserver:8080/geoserver/wfs",                   

                    featureNS: "http://www.openplans.org/topp", 
                    featureType: "xxxx", 
                    geometryName: "SHAPE", 
                    srsName: "EPSG:4326",                  
                    version: "1.1.0" 
                    })                    
                });


best regards
Sarah


________________________________


Hi all,

this is my code and here layer is information of layer that  i want to add into 
the map. can any one help me for this code

var wfsLayer = new OpenLayers.Layer.Vector(
                layer.name
           ,     {
                     strategies: [new OpenLayers.Strategy.Fixed()]
                  ,     protocol: new OpenLayers.Protocol.WFS({
                          url:this.urlvalue
                      ,    version: "1.0.0"
                    ,    srsName: "EPSG:4326"
                    ,     featureType: layer.protocol.featureType
                    ,    featureNS: "http://www.openplans.org/topp"
                  })
                ,    projection:  new OpenLayers.Projection("EPSG:4326")
                ,    styleMap: new OpenLayers.StyleMap({
                    strokeColor: "Red",
                    strokeWidth: 2,
                    strokeOpacity: 0.5,
                    fillOpacity: 0.2
                }) 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20100721/75b52163/attachment.htm 


More information about the Users mailing list