Works perfect!!, <div><br></div><div>my problem was with my code, I had an error because I used getControlsByClass to select the WMSGetFeatureInfo control and this method returns an array of controls not a control. As you can see, a stupid mistake!!</div>

<div><br></div><div>Apologize for the inconveniences.</div><div><br clear="all">Micho García<br>GIS Developer Artisan<br><a href="http://michogarcia.org" target="_blank">michogarcia.org</a><br><a href="http://geomati.co" target="_blank">geomati.co</a><br>


<br><br><div class="gmail_quote">2012/8/13 Phil Scadden <span dir="ltr"><<a href="mailto:p.scadden@gns.cri.nz" target="_blank">p.scadden@gns.cri.nz</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im"><br>
> I'm working with WMSGetFeatureControl and I need to change dynamically<br>
> the layers that I go to get info. I've tried assigning a layers array<br>
> to WMSGetFeatureControl layers property, but this fails.<br>
</div>If I had to guess, I would say you are doing<br>
<br>
myWMSGFScontrol.layers = myLayer;<br>
<br>
instead of<br>
<br>
myWMSGFScontrol.layers = [myLayer];<br>
<br>
???<br>
<br>
<br>
<br>
Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.<br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
</div></div></blockquote></div><br></div>