Highlight a specific shape record

Abe Gillespie agillesp at VT.EDU
Wed Feb 9 12:58:59 PST 2005


Is there anyway to highlight a specific shape if I know its tileindex
and shapeindex?  These values are gathered from a prior query.  And
then the user chooses a given record to zoom to.  I tried just using a
shape query but this is returning puzzling results.  Here's some code
that sorta does what I'm talking about:

$layer->open();
$s = $layer->getShape($tileindex, $shapeindex);
$layer->queryByShape($s);
$cnt = $layer->getNumResults();

$cnt above is somewhere in the number of 150+ records.  This is weird
because this is just a simple house layer where no houses are touching.
  I also fool around with setting $layer->tolerance = -1 ... does
setting the tolerance at runtime have any effect on the spatial query?

I would still prefer a more direct method for highlighting the given
shape just by using its tileindex and shapeindex.

Thanks for any help.
-Abe



More information about the MapServer-users mailing list