SWIGMapscript: How to access resultCacheObj after queryByAttribut es ?

Sean Gillies sgillies at FRII.COM
Thu Oct 7 08:51:12 PDT 2004


On Oct 7, 2004, at 9:20 AM, GeoIT wrote:

> Dear experts,
> In Mapserver 4.0 it was possible to get the resultCacheObj after a
> queryByAttribute using layerObj.getResultcache().
> This method is no longer available in 4.2.2.
>
> How can I get a resultCacheObj in 4.2.2 SWIGMapscript ?
>
> Kind regards
> Andreas Paukner-Ruzicka

Like this:

   layer.query(...)
   numresults = layer.getNumResults()
   for i in range(numresults):
       result = layer.getResult(i)
       ...

MapServer 4.2.4 is going to be released soon.  Has some major
fixes for Java mapscript, and also for querying.  It re-exposes
the resultcache so that users can access the spatial bounds of
a set of results

   layer.query(...)
   results = layer.resultcache
   bounds = results.bounds       # a mascript.rectObj

This release will be out within a week and i strongly recommend
that you upgrade when it is available.

Sean


--
Sean Gillies
sgillies at frii dot com
http://users.frii.com/sgillies



More information about the MapServer-users mailing list