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

Clicking on Cluster zooms map past maxZoom #231

Open
chadrob1990 opened this issue Dec 30, 2021 · 1 comment
Open

Clicking on Cluster zooms map past maxZoom #231

chadrob1990 opened this issue Dec 30, 2021 · 1 comment

Comments

@chadrob1990
Copy link

Is there a way to set this up to when you click on a Cluster, it will not zoom past your maxZoom?

My maxZoom is set to 14, so I don't want clicking on a Cluster to zoom past that point, but the default when clicking on a Cluster is zooming the map to like 18.

@chadrob1990
Copy link
Author

Hi everyone, it looks like I was able to find a workaround for this by simply adding a maxZoomLevel={} to the component (in addition to maxZoom={}).

maxZoom - This breaks up the Cluster at zoom level X
maxZoomLevel - This prevents the Cluster from zooming in all the way after breaking (which can be jarring).

Not ideal as it prevents the user from zooming in further past maxZoomLevel if they so desire, but it does prevent the Cluster from zooming in all the way.

If someone has a better solution, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant