[ms4w-users] problems querying shape via mapscript
giohappy at gmail.com
Wed Oct 26 12:18:28 EDT 2005
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();
@$gpoMap->queryByPoint($oClickGeo, MS_SINGLE, -1);
for($iLayer=0; $iLayer < $gpoMap->numlayers; $iLayer++)
$oLayer = $gpoMap->GetLayer($iLayer);
$numResults = $oLayer->getNumResults();
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ms4w-users