SINTEF-9012 / PruneCluster

Fast and realtime marker clustering for Leaflet
MIT License
551 stars 131 forks source link

Question about a lowest cluster population setting #137

Closed ud09 closed 7 years ago

ud09 commented 7 years ago

Hi, I want to learn if it's possible to set a cluster population threshold so that if the cluster population is less than or equal to that limit draw markers, otherwise draw cluster icon. Current implementation works like this limit is set to 1. I'd like to learn if this is doable without a huge code change before digging into your code. Thanks.

fungiboletus commented 7 years ago

Hei,

I think it's a difficult and heavy change, because the code is very designed for the current limit of 1. The library has a few technics to improve performances with single markers, and it's not an easy part to change in the source code.

Maybe, you could create a custom cluster icon, that shows markers when the population of the marker isn't to high.

ud09 commented 7 years ago

Also supposed to draw polygons instead of markers, just overriding BuildLeafletClusterIcon will not be enough I guess. Thanks for your answer.

fungiboletus commented 7 years ago

You are welcome :)