Highlight a specific shape record

Yewondwossen Assefa assefa at DMSOLUTIONS.CA
Thu Feb 10 10:34:34 EST 2005


Hi There,

I don't think there is way to do it easily right now. I think what we
need is to expose a function throgh mapscript that lets you add a shape
to the the "query   results buffer" (somethig like
$layer->addtoquery(shape)). You can then use regular draw query
functions to highlight these elements.

Do anyone else see the need for this kind of functionality ? I could
certainly use it myself for some projects and would be willing to
implement it.

Later,


Abe Gillespie wrote:
> 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
>


--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------



More information about the mapserver-users mailing list