There seems to be the same text in both WMS 1.1.1 and 1.3.0 standards
" 18.104.22.168 QUERY_LAYERS
The required QUERY_LAYERS parameter states the map layer(s) from which feature
information is desired to be retrieved. Its value is a comma-separated list of one or more
map layers. This parameter shall contain at least one layer name, but may contain fewer
layers than the original GetMap request.
If any layer in this list is not contained in the Capabilities XML of the WMS, the results
are undefined and the WMS shall produce an exception response."
At least it does not explicitly say that QUERY_LAYERS must be a the same than LAYERS or a subset of it. Throwing an error here feels unnecessary punishment.
Andrea Aime wrote:
On Mon, Feb 11, 2013 at 1:38 PM, Rahkonen Jukka <jukka.rahkonen@...>> wrote:
It there really a need to adjust "LAYERS"? We keep it to whatever is happens to be and change only the "QUERY_LAYERS" on the client side. Actuallly we capture the last used WMS GetMap and construct a new GetFeatureInfo by using it as a template and adding the constant QUERY_LAYERS and X and Y parameters from the mouse click. That works for us but the WMS server in this case is Mapserver and not Geoserver.
As far as I remember, by specification the server should throw an error if the query_layers layers are not a subset of layers
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.
Ing. Andrea Aime
Via Poggio alle Viti 1187
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549