[Mapserver-users] QuerybyPoint no result (Help) PHP/Mapscript
Charlton Purvis
cpurvis at asg.sc.edu
Fri Apr 25 11:21:03 PDT 2003
Hi, Jose:
This part looks a little suspicious to me, but may be I'm missing
something.
(1) $layerObj = $map->getLayerByName('postes');
(2) $layerObj = @$map->queryByPoint ($ptClicked,MS_SINGLE,-1);
(3) if($layerObj == MS_SUCCESS)
(4) {
(5) $results = $layerObj->{resultcache};
(6) $num_results = $results->{numresults};
After (1), $layerObj is a layer object. But after (2), $layerObj is an
int. I'm surprised that (5) doesn't give you an error. I'm assuming
MapServer 3.7, is that right?
Why not remove (2) and change (3) to . . .
if (@$map->queryByPoint ($ptClicked,MS_SINGLE,-1) == MS_SUCCESS)
. . . since you want to run the query but not really assign it to
anything.
I'm not sure that will work, but it's worth a shot.
If that doesn't help, send me your entire .php and .map, and we'll try
again.
Charlton
More information about the MapServer-users
mailing list