[OpenLayers-Users] Highlighting a feature?

Christopher Schmidt crschmidt at metacarta.com
Sat Dec 1 08:15:29 EST 2007


On Sat, Dec 01, 2007 at 06:14:04PM +1100, bradleyspencer wrote:
> Another option that I have used is based on WMS (CubeWerx only) which can
> return GML on a map click containing both the geometry and attributes of any
> objects within distance of the mouse click. That can then be used to draw
> the polygons into an OL feature layer styled any way you wish.

With MapServer, you can do that with a bit of client side bounds
creation, and a WFS query: the boston freemap does this (though it did
it *long* before vector layer, so it's only used to display attributes): 

http://boston.freemap.in/ lets you click on the map, and yo'll see a
list of streets near your click on the right hand side.

The geometry is there in the response: you could easily toss the URL
directly into a Layer.GML and just add that to the map, rather than
doing anything more complex. 

Gregor: Would you be willing to combine these suggestions into a
wikipage on the OpenLayers wiki? I think that it's a generally useful
question, and this thread has covered a lot of good ideas.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list