[mapserver-users] Mapscript Rasterquery returns empty result
Tom van der Putte
tom at vdputte.nl
Wed Apr 28 07:48:41 PDT 2010
Hi,
I have the following code:
$oMap->prepareQuery();
$oPoint = ms_newPointObj();
$oPoint->setXY($x,$y); //coords received from a AJAX call
$oLayer = $oMap->GetLayerByName($szLayer); //Name received from a
AJAX call
$status = $oLayer->queryByPoint($oPoint, MS_MULTIPLE, 1);
$status = $oLayer->open();
$result = $oLayer->getResult(0);
$numResults = $oLayer->getNumResults();
$shape = $oLayer->getShape($result->shapeindex,$result->tileindex);
echo(var2json($shape));
This results in the follwing json code to be returned:
{"_handle_":Resource id #45,"numlines":1,"type":0,"index":-1,
"tileindex":-1,"classindex":0,"numvalues":8,"text":"",
"bounds":{"_handle_":Resource id #46,"minx":607000,
"miny":677000,"maxx":607000,"maxy":677000},
"values":[null,null,null,null,null,null,null,null]}
No matter what I try, it keeps returning empty shapes. How can this
be?
P.S. I'm using mapserver 5.2.1 from the ms4w package.
Cheers,
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100428/44f2900f/attachment.htm>
More information about the MapServer-users
mailing list