php-queries

Daniel Morissette morissette at dmsolutions.ca
Thu Jan 25 09:24:24 EST 2001


Robert Ofarrell wrote:
> 
> At the moment I am toying with the querymap, and one thing that I would
> like to do is to zoom to a result of a query.  Is this possible with
> php-mapscript, and if so could you give me a brief description of how to
> do it - or point me in the direction of some information which would help
> please?
> 

Robert,

I haven't played much with querymaps and I'm not sure what's the best
way to do what you ask, I don't think there is a direct way to "zoom to
selected objects", but I may be wrong.  

I guess one possibility would be using the shapeFileObj to open your
layer, and read the extent (getExtent(i)) of all selected objects... and
then use that to set the map extent.  Requires a bit of coding, but that
would work... 

Hopefully someone on the MapServer list will know a more straightforward
method (using either Perl or PHP).

Good Luck!
-- 
------------------------------------------------------------
 Daniel Morissette                morissette at dmsolutions.ca
                 http://www.dmsolutions.ca/
------------------------------------------------------------
  Don't put for tomorrow what you can do today, because if 
      you enjoy it today you can do it again tomorrow.




More information about the mapserver-users mailing list