Are your layers separate layers or grouped layers (i.e. layers=a,b,c)?
Would setting the layers property of the control work for you?
/**
* Property: layers
* {Array(<OpenLayers.Layer.WMS>)} The layers to query for feature info.
* If omitted, all map WMS layers with a url that matches this <url> or
* <layerUrls> will be considered.
*/
layers: null,
Best regards,
Bart
--
Bart van den Eijnden
OpenGeo - http://opengeo.org
Expert service straight from the developers.
On Feb 7, 2011, at 5:21 PM, Andreas Neumann wrote:
> Hi,
>
> I am fighting with the WMSGetFeatureInfo control. I defined this once the
> project is loaded, but want to later influence which layers are queried and
> which not. I don't want to query all visible layers, but only some.
>
> So my question is, how can I change the QUERY_LAYERS parameter at a later
> stage, after the WMSGetFeatureInfo was already created?
>
> I tried with just setting the QUERY_LAYERS parameter, but it seems to be
> ignored. OpenLayers uses the full visible layer list and ignores my modified
> QUERY_LAYERS array.
>
> Thank you for any hints on how I can modify QUERY_LAYERS at a later stage
> after the control was created.
>
> Thanks a lot!
>
> Andreas
>
> --
> --
> Andreas Neumann
> Böschacherstrasse 10A
> 8624 Grüt (Gossau ZH)
> Switzerland
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users