Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm investigating OpenLayers and I'm trying to see if it's possible to filter down the number of displayed feature items.

Is it possible to display many nearby items as a single point item on a map when zoomed out. So instead of hundreds of nearly overlapping points I can filter them down a few dozen consolidated points? Or is this something that has to be in the Spatial server?

share|improve this question

2 Answers 2

I am not too familiar with OpenLayers myself but I do know that the term for this is 'clustering' and it looks like there is a class in OpenLayers expressly for this: OpenLayers.Strategy.Cluster

Example page: http://openlayers.org/dev/examples/strategy-cluster.html

Try Googling around a bit for "openlayers" and "cluster" and you'll find a lot more.

share|improve this answer

Since version 6.0, MapServer has the ability to combine multiple features from a point layer into single (aggregated) features based on their relative positions. So if you are using Mapserver you can try it. I've used this feature in one of my project, you can see result here. Clustering on client side as mentioned above is not right way if your layer contains a lot of features.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.