[OpenLayers-Users] Best way to implement hover/click highlighting of polygons

Peter Becker pbecker at itee.uq.edu.au
Sun Aug 30 19:34:44 EDT 2009


Hello all,

I know it is a bit of a broad question, but after quite a few experiments I 
still feel a bit puzzled as to which way I want to set up a map in our 
application. The map displays certain areas (catchments, bay areas, etc.). The 
user should be able to click on those areas, which then shows detailed 
information in a side bar (div on the same level as the map's div).

We are using a stack with PostGIS and GeoServer and I managed to get the basic 
functionality working in different ways, e.g. using GeoServer's map previews as 
example as well as http://openlayers.org/dev/examples/getfeature-wfs.html .

But getting it to work is only one thing, I'd like to get some more 
understanding on the implications of different approaches. The two main 
concerns for me at the moment are the browser support and the number of 
roundtrips some approaches seem to take.

I saw http://trac.openlayers.org/wiki/Browsers -- does that mean all 
OpenLayers features are fully supported in each of these? Can I e.g. use an 
all-vector approach for the overlays and expect them to work?

And regarding the round trips: I would like the map view not to hit our server 
more than once per interaction -- mostly to keep the map snappy, but also to 
not but unnecessary burden on the server. The UI won't allow arbitrary zooming 
and panning, so bounds should get invalidated only as a result of some custom 
callback.

I was thinking along the lines of loading all polygons as WFS layer -- is that 
the way to do it? Should I set a specific strategy? I can't find much 
documentation on strategies.

Thanks for any hints/experiences you are willing to share.

Cheers,
  Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090831/2cf61167/attachment.html


More information about the Users mailing list