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. 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. -Jukka Rahkonen- Gis Mage wrote: > Hi list, > > I've got a couple of questions regarding a GetFeatureInfo request. > > 1. Why should I put both LAYERS and QUERY_LAYERS in the request? > I doesn't work with only one of those params, but I put in the same > list of layers in both params all the time. > What's the difference between them? > > 2. Why do I have to put both BBOX and HEIGHT, WIDTH params in > the request? > I guess the server draws a map with the requested bbox, height and > width, and then takes x and y, transforms to coordinates and executes > a query. > But that is just a blind guess and seems a bit strange. > So, pretend I want to get info for specified layer, it's in EPSG:4326 > and lat/lon of the point is (-104.97,39.71). > How do I calculate the BBOX, HEIGHT, WIDTH, X and Y of the request? > Is it somehow different if a layer is in EPSG:900913? > > -------------------------------------------------------------- > ---------------- > 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 > ------------------------------------------------------------------------------ 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