Ian Turton ha scritto:
On Tue, Aug 25, 2009 at 7:16 AM, Andrea Aime<aaime@anonymised.com> wrote:
Ian Turton ha scritto:
I have a bunch of student projects
(http://webmapping.mgis.psu.edu/geoserver/www/index.html) which all
worked fine when I marked them 4 months ago - but now they work
*except* for getfeatureInfo requests, compare
http://webmapping.mgis.psu.edu/geoserver-1.7.2/wms?WIDTH=600&SRS=EPSG%3A4326&LAYERS=topp%3APaStateRoads&HEIGHT=455&STYLES=&TRANSPARENT=true&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=-76.828171%2C40.087139%2C-76.066728%2C40.664567&X=413&Y=231&INFO_FORMAT=text%2Fhtml&QUERY_LAYERS=topp%3Atest2,topp%3Astationswgs84,topp%3Ahospitalswgs84
and
http://webmapping.mgis.psu.edu/geoserver/wms?WIDTH=600&SRS=EPSG%3A4326&LAYERS=topp%3APaStateRoads&HEIGHT=455&STYLES=&TRANSPARENT=true&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=-76.828171%2C40.087139%2C-76.066728%2C40.664567&X=413&Y=231&INFO_FORMAT=text%2Fhtml&QUERY_LAYERS=topp%3Atest2,topp%3Astationswgs84,topp%3Ahospitalswgs84
These servers share a common data directory so I'm at a loss here.
There has been many changes, yes. Please enable "verbose exceptions"
in the server configuration so that we can have a look at what went wrong..
OK - but the error message is the same. I've attached the log file
This time is much more informative. And I finally got why it's not working: the request you're making is invalid, older GeoServer did
not care, new one does because it tries to access the style for each
layer (to estimate the search radius layer by layer by style inspection,
e.g., you have points 20 pix wide, the search radius for that layer
becomes 10 pix).
Now, layer <-> style association is done parsing the GEtMap portion
of the request, that just states:
&LAYERS=topp%3APaStateRoads&styles=
meaning a style is retrieved for PaStateRoads, but then the
query layers are:
QUERY_LAYERS=topp%3Atest2,topp%3Astationswgs84,topp%3Ahospitalswgs84
for which no styles have been parsed.
The spec is not super clear about this:
"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."
But I think the meaning should be that the query_layers are to be a
subset of the "layers" param?
I'm inclined to change the code so that it throws an exception
explaining the request is invalid. What do you think?
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.