centering on the result of itemquery
Didrik Pinte
dpinte at ITAE.BE
Sat Apr 1 21:38:53 PST 2006
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 191 bytes
Desc: Ceci est une partie de message num?riquement sign?e
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060402/4248f93d/attachment.sig>
More information about the MapServer-users
mailing list