<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: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>I think this question may have been asked before but I’ve
looked online and can’t find it now. I’m using the following code
to get feature information to display in a popup, for some reason however, it
is only showing information from just one layer which is the first layer that
is called into the map? Does anyone know if this is a problem with GeoExt or
more likely something missing from code? Below is the snippet of code I am
using for generating featureinfo popup:<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal style='text-autospace:none'><o:p> </o:p></p>
<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:10.0pt;
font-family:"Courier New";color:#0000C0;background:white;mso-highlight:white'>var</span></b><span
style='font-size:10.0pt;font-family:"Courier New";background:white;mso-highlight:
white'> <span style='color:black'>featureInfo</span> <span style='color:#5C5C5C'>=</span>
<b><span style='color:#0000C0'>new</span></b> <span style='color:black'>OpenLayers</span><span
style='color:#5C5C5C'>.</span><span style='color:black'>Control</span><span
style='color:#5C5C5C'>.</span><span style='color:black'>WMSGetFeatureInfo</span><span
style='color:#5C5C5C'>();</span></span><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";background:white;mso-highlight:white'> <span
style='color:black'>featureInfo</span><span style='color:#5C5C5C'>.</span><span
style='color:black'>events</span><span style='color:#5C5C5C'>.</span><span
style='color:black'>on</span><span style='color:#5C5C5C'>({</span></span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";background:white;mso-highlight:white'>
<span
style='color:black'>getfeatureinfo</span><span style='color:#5C5C5C'>:</span> <b><span
style='color:#0000C0'>function</span></b><span style='color:#5C5C5C'>(</span><span
style='color:black'>e</span><span style='color:#5C5C5C'>)</span> <span
style='color:#5C5C5C'>{</span></span><span style='font-size:10.0pt;font-family:
"Courier New"'><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";background:white;mso-highlight:white'>
<b><span
style='color:#0000C0'>new</span></b> <span style='color:black'>GeoExt</span><span
style='color:#5C5C5C'>.</span><span style='color:black'>Popup</span><span
style='color:#5C5C5C'>({</span></span><span style='font-size:10.0pt;font-family:
"Courier New"'><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";background:white;mso-highlight:white'>
<span
style='color:black'>title</span><span style='color:#5C5C5C'>:</span> <span
style='color:#005C00'>"Feature Info"</span><span style='color:#5C5C5C'>,</span></span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";background:white;mso-highlight:white'>
<span
style='color:black'>width</span><span style='color:#5C5C5C'>:</span> <span
style='color:#004080'>200</span><span style='color:#5C5C5C'>,</span></span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";background:white;mso-highlight:white'>
<span
style='color:black'>height</span><span style='color:#5C5C5C'>:</span> <span
style='color:#004080'>150</span><span style='color:#5C5C5C'>,</span></span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";background:white;mso-highlight:white'>
<span
style='color:black'>autoScroll</span><span style='color:#5C5C5C'>:</span> <span
style='color:#800040'>true</span><span style='color:#5C5C5C'>,</span></span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";background:white;mso-highlight:white'> <span
style='color:black'>queryVisible</span><span style='color:#5C5C5C'>:</span> <span
style='color:#800040'>true</span><span style='color:#5C5C5C'>,</span></span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";background:white;mso-highlight:white'> <span
style='color:black'>map</span><span style='color:#5C5C5C'>:</span> <span
style='color:black'>map</span><span style='color:#5C5C5C'>,</span></span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:108.0pt;text-indent:36.0pt;text-autospace:
none'><span style='font-size:10.0pt;font-family:"Courier New";background:white;
mso-highlight:white'>
<span style='color:black'>feature_count</span><span style='color:#5C5C5C'>:</span>
<span style='color:#004080'>50</span><span style='color:#5C5C5C'>,</span></span><span
style='font-size:10.0pt;font-family:"Courier New";color:#5C5C5C'>//Used as some
layers consist of point data that are grouped in close proximity to each other</span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:108.0pt;text-indent:36.0pt;text-autospace:
none'><span style='font-size:10.0pt;font-family:"Courier New";background:white;
mso-highlight:white'>
<span style='color:black'>lonlat</span><span style='color:#5C5C5C'>:</span> <span
style='color:black'>mapPanel</span><span style='color:#5C5C5C'>.</span><span
style='color:black'>map</span><span style='color:#5C5C5C'>.</span><span
style='color:black'>getLonLatFromPixel</span><span style='color:#5C5C5C'>(</span><span
style='color:black'>e</span><span style='color:#5C5C5C'>.</span><span
style='color:black'>xy</span><span style='color:#5C5C5C'>),</span></span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:108.0pt;text-autospace:none'><span
style='font-size:10.0pt;font-family:"Courier New";background:white;mso-highlight:
white'> <span
style='color:black'>html</span><span style='color:#5C5C5C'>:</span> <span
style='color:black'>e</span><span style='color:#5C5C5C'>.</span><span
style='color:black'>text</span></span><span style='font-size:10.0pt;font-family:
"Courier New"'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:108.0pt;text-indent:36.0pt;text-autospace:
none'><span style='font-size:10.0pt;font-family:"Courier New";background:white;
mso-highlight:white'> <span
style='color:#5C5C5C'>}).</span><span style='color:black'>show</span><span
style='color:#5C5C5C'>();</span></span><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";background:white;mso-highlight:white'> <span
style='color:#5C5C5C'>}</span></span><span style='font-size:10.0pt;font-family:
"Courier New"'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:108.0pt;text-indent:36.0pt;text-autospace:
none'><span style='font-size:10.0pt;font-family:"Courier New";color:#5C5C5C;
background:white;mso-highlight:white'>});</span><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black;background:white;mso-highlight:white'><o:p> </o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black;background:white;mso-highlight:white'>mapPanel</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#5C5C5C;background:
white;mso-highlight:white'>.</span><span style='font-size:10.0pt;font-family:
"Courier New";color:black;background:white;mso-highlight:white'>map</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#5C5C5C;background:
white;mso-highlight:white'>.</span><span style='font-size:10.0pt;font-family:
"Courier New";color:black;background:white;mso-highlight:white'>addControl</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#5C5C5C;background:
white;mso-highlight:white'>(</span><span style='font-size:10.0pt;font-family:
"Courier New";color:black;background:white;mso-highlight:white'>featureInfo</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#5C5C5C;background:
white;mso-highlight:white'>);</span><span style='font-size:10.0pt;font-family:
"Courier New"'><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black;background:white;mso-highlight:white'>featureInfo</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#5C5C5C;background:
white;mso-highlight:white'>.</span><span style='font-size:10.0pt;font-family:
"Courier New";color:black;background:white;mso-highlight:white'>activate</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#5C5C5C;background:
white;mso-highlight:white'>();</span><span style='font-size:10.0pt;font-family:
"Courier New"'><o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";
background:white;mso-highlight:white'> <o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";
background:white;mso-highlight:white'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";
background:white;mso-highlight:white'><o:p> </o:p></span></p>
<p class=MsoNormal>Any help would be greatly appreciated.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Kind regards,<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Barry<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Email: be208@ex.ac.uk<span style='font-size:10.0pt;
font-family:"Courier New"'><o:p></o:p></span></p>
</div>
</body>
</html>