Le samedi 01 avril 2006 à 18:26 +0200, Didrik Pinte a écrit : > Hi, > > i'm using the CGI interface to mapserver. I'm trying to get in one call > a map centered on the result of a ITEMQUERY request. > > How is this possible ? > > Here is the working query i'm using at the moment : > > http://loclhost/cgi-bin/mapserv?map=/var/www/mapserver/csmap.map&mode=itemquery&layers=filling&scale=400000&mapxy=374974+1816035&mapsize=500+300&qlayer=selection&qstring=clientid%20=%20'T6_3137'&qitem=clientid > > Working fine but not centering on the result and displaying empty if the > searched point is outside of the visible bounding box. > > Many thanks in advance for your help. > > Didrik
Here is the answer ;-) adding MAPEXT=shapes to the query centers the query on the selected shapes. The SCALE must be defined in order to do the extent computation. ! The searched map file must have all the searchable points in its extent. Points outside of the extent cannot be searched. Is this a normal behaviour ? So the correct query string is the following : http://localhost/cgi-bin/mapserv?map=/var/www/mapserver/csmap.map&mode=itemquery&layers=filling&mapsize=500+300&qlayer=selection&qstring=clientid%20=%20'T8_7185'&qitem=clientid&mapext=shapes&scale=400000 Didrik
signature.asc
Description: Ceci est une partie de message numériquement signée
