SINTEF-9012 / PruneCluster

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

Smallest cluster size. #170

Closed BobbyBabes closed 6 years ago

BobbyBabes commented 6 years ago

Is there a way to determine when a cluster icon represents the smallest cluster size? And also when the next click will be zooming to a cluster's smallest size?

I had hoped to find the information in workingClusterList. But it doesn't look like that.

fungiboletus commented 6 years ago

Hei, I don't think it's possible with the current implementation because the clusters are processed on the fly for the current zoom level. So a cluster icon has no idea about the cluster at one zoom level deeper.

It could be possible to change a lot of code to process two zooms levels at once, but that would be expensive. Another library processing all the clusters at every zoom levels once may be a better choice if you really need this feature.

BobbyBabes commented 6 years ago

Too bad. I really need it. I need to give a visual cue when the smallest cluster size is displayed to indicate that load-balanced connecting is available (through double-click). Or will be available at the next zoom in. At the marker (unclustered) level, only precise connecting is possible (through double click). I can do this with cluster.population === 1.

BobbyBabes commented 6 years ago

Forgot to close the issue. Thanks for your help.