[OpenLayers-Users] Highlight elements
Christopher Schmidt
crschmidt at metacarta.com
Thu Jan 25 12:16:16 EST 2007
On Thu, Jan 25, 2007 at 06:11:28PM +0100, Aitor Calero Garcia wrote:
> > Christopher,
> >
> > I believe this is like the mapserver Query functionality. if you do a
> > query the query results highlighted on the map. In the description
> > below, the id could be a UID for a shapefile or a database record or
> > whatever and they want to be able to highlight that object(s) on the
> > map.
>
>
> Exactly!!! I think that it is possible to add an SLD parameter to WMS
> request with a new style to be applied in an specific layer. I wonder if
> this could be done in OpenLayers, or if it is any other way to achieve
> this.
If you can provide an example WMS Image URL before and after, I can
provide more specific information, but something like:
layer.mergeNewParams({'queryfeature':'id', 'id':17})
Should cause the layer to redraw itself with the tiles having
&queryfeature=id&id=17 tacked on. See
http://openlayers.org/dev/examples/wmst.html
For example usage.
If it's more complex than that, things might get more hairy, but it
seems like it's probably possible to do what you want.
> It is a very common feature. Look for some parcels, for example,
> retrieve a list, and get all those parcels highlighted in the map.
"common" for you :) I'm a Javascript programmer, not a map user!
Regards,
--
Christopher Schmidt
MetaCarta
More information about the Users
mailing list