[Geomoose-users] Displaying the number of resulting features

Matej Mailing mailing at tam.si
Thu Oct 18 10:41:57 PDT 2012


Hi,

Thank you for your answer. I am trying to display the number of
results from query.php and I have found the following thread:

http://lists.osgeo.org/pipermail/geomoose-users/2011-June/003091.html

The suggested solution by Brent Fraser to make the change to query.php,
"So

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

becomes

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

Doesn't work for me. I can successfully add the [nlr] to the
'itemquery' template, but it is displayed for every resulting record.
The idea is to display the number of records in the header. I have
also tried to set "itemquery_header" with no success.

Any solutions are very welcome.

Thanks,
Matej

2012/10/18 Eli Adam <eadam at co.lincoln.or.us>:
>
> On Thu, Oct 18, 2012 at 6:55 AM, Matej Mailing <mailing at tam.si> wrote:
>>
>> Hi,
>>
>> I see that there is a number='n' where n replaces the result numbers
>> in the query.php. How can we use this correctly returned information
>> to display in a template?
>>
>
> If you reference a html template from your map file:
>
>     METADATA
>         'select_record'    'select_survey.html'
>         'select_header'    'select_header_survey.html'
>     END
>
> In you html template, you might be able to do something like:
>
>     <tr><td>
>
>         <b>Results:</b> <span id="numShapes">[nlr]</span>
>     </td><td
>
> HTH, Eli
>
>
>>
>> Thanks,
>> Matej
>> _______________________________________________
>> Geomoose-users mailing list
>> Geomoose-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/geomoose-users
>
>


More information about the Geomoose-users mailing list