[OpenLayers-Users] vector layer clustering LOD

Christian Ledermann christian.ledermann at gmail.com
Wed Jul 13 03:09:45 EDT 2011


I try to display a map of water bodies on a global map.
The problem is that some a very big (like the amazon, nile, caspian
sea) which will show up on a global
map, and others (like san juan river, lake ohrid, lake skodar, etc)
are so small (and close together) that in a global map they won't show
up. so i want to display the bigger water bodies as polygons and the
smaller ones clustered.


There are two possible approaches i can think of:

1). client side clustering: use openlayers clustering.
Q: I have not seen an example of how to do this, is this even achievable?

pro: just one layer to load, once it is loaded fast interaction on the
client side

con: the layer could be very big, initial load time is long,
      probably non trivial JS for clustering


2) server side clustering: use two layers, one for the 'visible in
this zoom factor/bbox' polygons and another one for the 'too small for
this zoom factor/bbox' first displayed with strategy fixed, the latter
with strategy clustered.

pro: smaller layers to load, faster initial load (the 'too small'
layer could be simplified to just the centre points, and the layers
just have to have the features of your current visible area )
trivial JS

con: with every zoom/pan you have to reload the layers, load on the
server increases, with poor internet connectivity the client becomes
'sluggish'



I would like to hear what you think, or how you solved a similar problem.
Any hints or suggestions are highly appreciated ;)


-- 
Best Regards,

Christian Ledermann

Nairobi - Kenya
Mobile : +254 702978914

<*)))>{

If you save the living environment, the biodiversity that we have left,
you will also automatically save the physical environment, too. But If
you only save the physical environment, you will ultimately lose both.

1) Don’t drive species to extinction

2) Don’t destroy a habitat that species rely on.

3) Don’t change the climate in ways that will result in the above.

}<(((*>


More information about the Users mailing list