[ms4w-users] problems querying shape via mapscript
Giovanni A.
giohappy at gmail.com
Wed Oct 26 12:18:28 EDT 2005
Hello,
I'm having a problem with querying a shapefile layer, using "queryByPoint", basing my prototype on gmap demo application. Everything works fine, it shows me all the layer present in the map, the coordinate points "$nClickGeoX,$nClickGeoY" are correctly transformed from screen coords to projected coords, but "$numResults " is always equal to 0... I'm going mad! What's wrong with my script? Do I have to set some particular tags in teh mapfile to allow querying? (In the map demo there isn't any particular tag).
Help, it's urgent...
$oClickGeo = ms_newPointObj();
$oClickGeo->setXY($nClickGeoX, $nClickGeoY);
@$gpoMap->queryByPoint($oClickGeo, MS_SINGLE, -1);
for($iLayer=0; $iLayer < $gpoMap->numlayers; $iLayer++)
{
$oLayer = $gpoMap->GetLayer($iLayer);
$oLayer->open();
$numResults = $oLayer->getNumResults();
echo $numResults;
$oLayer->close();
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ms4w-users/attachments/20051026/ce8c7667/attachment.html
More information about the ms4w-users
mailing list