[Geomoose-users] Mapserver templating and geomoose

Brent Fraser bfraser at geoanalytic.com
Sat Jun 4 12:47:27 EDT 2011


a,

   Geomoose uses PHP along with Mapserver's Mapscript to return the 
results of a query (instead of invoking the Mapserver executable in CGI 
mode).  Specifically, it uses Mapscript's processquerytemplate 
function.  Looking at the Mapserver doc for the related function 
processtemplate 
(http://mapserver.org/en/mapscript/php/index.html#processtemplate), it says:

   "Only tags that have an equivalent element in the map object are 
replaced"

I expect dynamic query-related things like [nr] are not replaced.  One 
solution is to modify GeoMoose's itemquery.php (or the query script you 
are using) to pass the number of results to the function for 
replacement.  So

     $results = $map->processquerytemplate(array(), false);

becomes

     $tmparray["nr"] = $numResults;
     $results = $map->processtemplate($tmparray, false);

but I haven't tested it....

Best Regards,
Brent Fraser


On 6/4/2011 9:53 AM, aborruso wrote:
> Hi all,
> I would like to have in Geomoose itemquery_header the total number of
> results. It seems that itemquery_header file is a MapServer template file,
> but if I use [nr] MapServer CGI parameters, I do not have the Total number
> of results. I have simply "[nr]" string in the header of results.
> Is it normal? I there a way to have the total number of results in the
> header of a Geomoose search report?
>
> Thank you,
>
> a
>
> --
> View this message in context: http://geomoose-users.964460.n3.nabble.com/Mapserver-templating-and-geomoose-tp3023495p3023495.html
> Sent from the Geomoose-users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Simplify data backup and recovery for your virtual environment with vRanger.
> Installation's a snap, and flexible recovery options mean your data is safe,
> secure and there when you need it. Discover what all the cheering's about.
> Get your free trial download today.
> http://p.sf.net/sfu/quest-dev2dev2
> _______________________________________________
> Geomoose-users mailing list
> Geomoose-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geomoose-users
>





More information about the Geomoose-users mailing list