Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow option of zooming in just enough so that the markers are unclustered, as opposed to zooming in just on the clustered markers #745

Open
armondavani-onward opened this issue Sep 8, 2023 · 2 comments
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@armondavani-onward
Copy link

For our implementation, we don't particularly want to zoom in all the way on the markers, it can be a bit annoying for how the map is used in our product. As a result when the cluster is clicked, you have to zoom back out some afterwards, even though the markers are still not clustered after zooming out.

I'd like an option for the library to allow you to zoom in just enough that is required to de-cluster. It seems like it could potentially be a straightforward addition, as you could just leverage the getClusterExpansionZoom function that already exists in supercluster.

The alternative for us would likely involve leveraging the supercluster library itself to find the required zoom value, and then using that value in an onClick handler for the clusters. But it feels a bit redundant to pass in the markers to this library, which invokes supercluster, and then we just do that again with the same markers on our end just to get a value that we pass back to this library. If markerclusterer gave us access to the instantiated supercluster, we could also simply leverage that to call the function ourselves, but markercluster seems to hide/abstract this away, and I'm not sure why. Even the clusters/markers that are returned from this library do not have all of the values on them that supercluster attaches to its return values, but rather maps over them a returns a slightly simpler object. I'm sure there's a reason for it, but from my perspective, the more information I potentially have access to, the more useful it is.

@armondavani-onward armondavani-onward added triage me I really want to be triaged. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Sep 8, 2023
@wangela
Copy link
Member

wangela commented Sep 8, 2023

If you would like to upvote the priority of this issue, please comment below or react on the original post above with 👍 so we can see what is popular when we triage.

@armondavani-onward Thank you for opening this issue. 🙏
Please check out these other resources that might help you get to a resolution in the meantime:

This is an automated message, feel free to ignore.

@usefulthink usefulthink removed the triage me I really want to be triaged. label Sep 13, 2023
@usefulthink usefulthink added the priority: p3 Desirable enhancement or fix. May not be included in next release. label Sep 29, 2023
@mdellanave
Copy link

mdellanave commented Apr 5, 2024

Hi,
I think I'm in a similar scenario: when the user click on the table item (list of pois) I want to expand the cluster programmatically to make the marker related to the table item visible in the map.

I'm able to check if the marker is in a cluster but I can't find a way to set the proper zoom to the map to make the marker out of the cluster.

Am I missing something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

4 participants