On 11 November 2011 09:07, Rahkonen Jukka <jukka.rahko...@mmmtike.fi> wrote: > Hi, > > That all comes from WMS standard and it is rather well written there > http://portal.opengeospatial.org/files/?artifact_id=1081&version=1&format=pdf > > Logic goes somehow in opposite direction than what you planning to do. It > assumes that user has made a GetMap request and sees a map on a screen. It is > just an image and does not include any information about georeferencing. If > use is clicking on a map the client software can only record which pixel was > clicked. However, the georeferencing can be computed on the WMS server side > if the WMS GetMap request with BBOX and image size is known. > > LAYERS just need to be in the request because standard says so but > QUERY_LAYERS is the one used for selecting layers to be queried. They do not > need to be the same.
LAYERS is there because in theory you can just change the request from getmap to getfeatureinfo and concatenate the click location and query layer and send it back. This meant that back in the early days before JavaScript became popular you could create a WMS client with some cgi shell scripts and a submit button in ah HTML form. > > For creating GetFeatureInfo requests from a scratch you will need to do some > calculation. The the centre point, decide some image size in WIDTH and HEIGHT > and compute BBOX according to those. If you find that you are having to do that sort of calculation then you should probably be using a WFS getFeature request instead of a WMS getFeatureInfo. Ian ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users