[fusion-users] Problems point querying layer
Tom van der Putte
tom at vdputte.nl
Mon Apr 12 11:53:40 EDT 2010
Hi
All,
I'm trying to query a layer by a point, which didn't succeed, some
simplified code:
$oLayer = $oMap->GetLayerByName('Basins');
$pnt = ms_newPointObj();
$pnt->setXY(451913,460265);
if ($oLayer->queryByPoint($pnt, MS_SINGLE,-1) == MS_SUCCESS) {
$rResultCache = $oLayer->getResult(0);
$oLayer->open();
$oResultShape = $oLayer->getFeature($rResultCache->index);
echo var2json($rResultCache);
echo var2json($oResultShape);
}
The corresponding AJAX result was:
{"shapeindex":0,"tileindex":-1,"classindex":0}
{"_handle_":Resource id
#45,"numlines":1,"type":2,"index":0,"tileindex":-1,"classindex":0,"numvalues":1,"text":"","bounds":{"_handle_":Resource
id
#46,"minx":3631647.00338,"miny":3100024.19118,"maxx":5147119.933,"maxy":3961971.08033},"values":[null]}
So the query is a success, but no result. The coords are correct and
in the map projection (actuallly read off the fusion frontend). I've
tried different layers, even rasters (which is the final goal) but no
succes.
Am I missing something? BTW I'm running mapserver 5.2.1 (ms4w 2.3.1)
Cheers,
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/fusion-users/attachments/20100412/787f9d7a/attachment.html
More information about the fusion-users
mailing list