<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-GB link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal>Hi all<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>I have defined a vector layer which successfully makes a WFS
call and displays features captured by my filter, as below: <o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>var wfs = new OpenLayers.Layer.Vector("WFS", {<o:p></o:p></p>
<p class=MsoNormal>
styleMap: WFSstyle,<o:p></o:p></p>
<p class=MsoNormal>
strategies: [new OpenLayers.Strategy.Fixed()],<o:p></o:p></p>
<p class=MsoNormal>
protocol: new OpenLayers.Protocol.WFS.v1_1_0({<o:p></o:p></p>
<p class=MsoNormal>
url:
"http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/apps/NewStart/htdocs/my.map",<o:p></o:p></p>
<p class=MsoNormal>
featureType: "cities",<o:p></o:p></p>
<p class=MsoNormal>
info_format: 'text',<o:p></o:p></p>
<p class=MsoNormal>
maxFeatures: 100,<o:p></o:p></p>
<p class=MsoNormal>
filter: myFilter,<o:p></o:p></p>
<p class=MsoNormal>
featureNS:
"http://mapserver.gis.umn.edu/mapserver"<o:p></o:p></p>
<p class=MsoNormal> })<o:p></o:p></p>
<p class=MsoNormal> }); <o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Since I also want a list of the captured features in
text form I can get this by adding to the above protocol definition: <o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>
parseFeatures: function(request) { <o:p></o:p></p>
<p class=MsoNormal> …code
to present features as a list…. <o:p></o:p></p>
<p class=MsoNormal> }<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>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.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Does anyone know of a way of getting both things at the same
time?<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Chris<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal> <o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</body>
</html>