-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Expose minimum and maximum zoom for clusters #2457
Comments
Why do you need these properties? Something like "click to expand" that would zoom in by one level in most cases but sometimes more? |
Yep, that'd be one of the primary usecases - @arunasank can go into more detail about how this number would be useful for her project. |
@mourner Exactly. If we had a property to reveal the exact zoom at which a cluster splits, it'll be easy to just split on click sometimes. It's useful when the points that make a cluster are very very close to each other sometimes, and spread apart at others. I have some clusters on http://arunasank.github.io/labhopping. The cluster on the bottom left splits at zoom 6, but the one on the top right only splits at zoom level 19 or so. |
@arunasank Sounds good! I'll look into it after vacation. Click to expand would be for the cluster max zoom, but what use case do you have for min zoom? |
@mourner \o/ The cluster max zoom would be super useful for our project, thanks! : ) I can't think of many use cases for the min zoom besides
|
Added in #6829 |
mapbox-gl-js version: latest
Steps to Trigger Behavior
Expected Behavior
Clusters contain a
min_zoom
property andmax_zoom
for the bounds at which they are clustered.Actual Behavior
They don't
Implementation-wise, supercluster's getClusterProperties method should expose the value of the cluster's max zoom. Behind that, clusters have a
zoom
property but this is the last zoom at which they are processed: this will need to include their range as well.The text was updated successfully, but these errors were encountered: