[OpenLayers-Users] wfs call that both displays features and parses them...?

Chris Green chris.green at ibstv.co.uk
Sun Mar 21 11:47:14 EDT 2010


Hi all

 

I have defined a vector layer which successfully makes a WFS call and
displays features captured by my filter, as below:  

 

var wfs = new OpenLayers.Layer.Vector("WFS", {

            styleMap: WFSstyle,

            strategies: [new OpenLayers.Strategy.Fixed()],

            protocol: new OpenLayers.Protocol.WFS.v1_1_0({

                url:
"http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/apps/NewStart/htdocs/my.ma
p",

                featureType: "cities",

                info_format: 'text',

                maxFeatures: 100,

                filter: myFilter,

                featureNS: "http://mapserver.gis.umn.edu/mapserver"

             })

 }); 

 

Since I also want  a list of the captured features in text form I can get
this by adding to the above protocol definition:  

 

            parseFeatures: function(request) { 

             .code to present features as a list..  

                }

 

My problem is that when I add parseFeatures to the WFS protocol the vector
layer no longer displays the features. It seems that I can either have the
features displayed on the layer or parse them into a list, but not both.

 

Does anyone know of a way of getting both things at the same time?

 

 

Chris

 

 

  

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100321/91fbf68a/attachment.html


More information about the Users mailing list