PHP - query expression
Daniel Morissette
morissette at dmsolutions.ca
Wed Jan 31 19:30:55 PST 2001
Robert Ofarrell wrote:
>
> Currently I am trying to facilitate a query by expression and from a reply
> from Daniel I have been working on setting the query expression and
> following that with a queryUsingRect() with the coordinates the size of
> the map. However I wish to do this dynamically so my question is, is
> there any way to set the query expression of a layer with PHP mapscript?
>
There is a queryObj class with a setExpression() method that you should
be able to use. However, I just realized that there is no way to access
existing query objects inside a layer from MapScript... you can only
create new ones. This seems to be true with the Perl MapScript too, is
that possible, Steve?
Hummm... I guess this part of the code hasn't been used much before...
What you could do until this is resolved is not include a QUERY object
in your layer in the .map file, and instead create one in your script
using $query=ms_newQueryObj($layer); ... and then you should be able to
use setExpression() on the new object.
--
------------------------------------------------------------
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