redraw acc. to query

Assefa Yewondwossen assefa at dmsolutions.on.ca
Wed Nov 1 11:47:59 EST 2000


Hi,

Most of the missing wrapers in the php mapscript are now added and available
in the CVS. The documenation is also up todate (
http://www2.dmsolutions.on.ca/mapserver/php_mapscript/php_mapscript_docs.html)

Later,

Daniel Morissette wrote:

> Dennis Christopher wrote:
> >
> > (I posted this question once before, but haven't got an answer.) I don't
> > beleive it involves anything difficult.
> > Can anyone give me an outline of how to do this?
> >
> > I want to have the current map redrawn according to a query result, with
> > the areas selected
> > by the query drawn in some specified highlight color, and the
> > non-selected areas drawn as normal.
> >
>
> Hi Dennis,
>
> Based on what I read in your previous message, I assume that you're
> trying to use the QUERYMAP feature with PHP MapScript (i.e. not the
> mapserv CGI), right?
>
> In MapScript, if you want selected items to be highlighted according to
> the QUERYMAP settings, you have to use the drawQueryMap() method after
> running your Query, instead of drawMap().
>
> Say your map contains the following:
>
> QUERYMAP
>    COLOR 255 0 0
>    STYLE HILITE
> END
>
> then you would need the following PHP code to draw your map with the
> result of the query highlighted:
>
>     $gpoQueryResults = $gpoMap->QueryUsingPoint(...);
>
>     ...
>
>     if ($gpoQueryResults && $gpoQueryResults->numresults > 0)
>     {
>         $img = $gpoMap->drawquerymap($gpoQueryResults);
>         $url = $img->saveWebImage(0, 0);
>     }
>     else
>     {
>         $img = $gpoMap->draw();
>         $url = $img->saveWebImage(0, 0);
>     }
>
> Unfortunately, drawQueryMap() is not available in the current version
> PHP MapScript.  It's one of those functions that we never needed and for
> which we had not written a PHP wrapper yet.  Assefa is about to complete
> the task of going through all the MapScript classes in the PHP MapScript
> module and adding PHP wrappers for the missing ones.  This should be
> committed in the CVS in the next few days.
>
> I hope that helps.
> --
> ------------------------------------------------------------
>  Daniel Morissette             morissette at dmsolutions.on.ca
>                http://www.dmsolutions.on.ca/
> ------------------------------------------------------------
>   Don't put for tomorrow what you can do today, because if
>       you enjoy it today you can do it again tomorrow.

--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: assefa at dmsolutions.on.ca
http://www.dmsolutions.on.ca

Phone: (613) 565-5056
----------------------------------------------------------------





More information about the mapserver-users mailing list