[Mapserver-users] Fwd: Re: perl mapscript 3.6.4 $layer->queryByPoint
Vincent Jansen
vincent at javel.nl
Fri Jan 17 07:46:21 PST 2003
Steve send me the solution, works great
Hi Vincent: The layer isn't queryable as it sits. Even though you
probably won't use it you have to define a template in the CLASS
section. Something like:
TEMPLATE "dummy"
should be sufficient.
Steve
>>> Vincent Jansen <vincent at javel.nl> 01/17/03 09:08 AM >>>
Hi,
In perl I'm using the folowing :
$layer = $mapObj->getLayerByName('query wijk');
$layer->{status} = 1;
$result = $layer->queryByPoint($mapObj, $point, MS_SINGLE, 0);
$data = $layer->getResult(0);
$shape = $data->{shapeindex};
width a valid mapObj and Point
on a layer that looks like
LAYER
CLASS
COLOR 0 0 255
OUTLINECOLOR 0 0 0
SYMBOL 'arcering'
END
DATA "wijkvlakken"
NAME "query wijk"
STATUS OFF
TYPE POLYGON
END
althoug $return == 1 and i'm positive there's a shape at the givvin
point,
somehow $data and $shape stay empty
Am i missing something obvious?
Thanks
--
Vincent Jansen
vincent at javel.nl
-------------------------------------------------------
More information about the MapServer-users
mailing list