Skip to content

Keep the zoom level when unclustering upon clicking on a cluster #3211

@kyeastmood

Description

@kyeastmood

When using the "clustered" layer type, clicking on a cluster on the map causes an abrupt zooming in which is confusing and often not desired.

I think a better approach would be to keep the current zoom level and "expand" the cluster completely or brake it into smaller clusters.

For example, if a cluster of 64 is clicked it could either expand to 64 elements it contains or to 8 sub-clusters which 8 elements each.

There could be a threshold set for each clustered layer specifying the maximum number of sub-clusters or basic elements a cluster can expand to.

So if I set the threshold to 8, after clicking on a cluster of 15 it will expand to 2 sub-clusters (8 and 7) without zooming in. But if a cluster contains 8 elements and I click it, it will expand to these 8 elements.

If cluster expansion was animated it would be even better.

I think Leaflet contains a plugin for cluster management so maybe it doesn't have to implemented within uMap?

Illustration of the issue:
https://github.com/user-attachments/assets/beca197a-5da8-4e40-b3e7-843eae2aff0f

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions