How to use queryByFeatures?

Pēteris Brūns peteris.bruns at GMAIL.COM
Thu Jul 27 14:04:32 EDT 2006


Hi folks,

I started to play with php5-mapscript and could not understand how
layer->queryByFeatures() works.

Here is sample from my php script:
<?php
$pagasti = $Map->getLayerByName("pagasti");
$ciemi = $Map->getLayerByName("ciemi");
$pagasti->queryByPoint($point,MS_MULTIPLE,1000.0);
$ciemi->queryByFeatures($pagasti);
?>

and output is: Warning: [MapServer Error]: msQueryByFeatures(): Selection
layer has not been queried.

Any links to FM's or other hints?

Bottom line.
I added output of layer->resultcache->numresults at mapquery.c - here comes
most interesting part - if I call 2 times queryByPoint(), then at second
time
there is layer->resultcache variable, but when I call queryByPoint() and
then
pass layer as slayer to queryByFeatures(), slayer has NO resultcache
variable.

My system:
Kubuntu 6
kernel 2.6.15
Apache 2.0.55
PHP 5.1.2
PHP5-mapscript 4.6.1
-- 
pb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060727/a5882443/attachment.html


More information about the mapserver-users mailing list