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

Add bounding boxes for clusters #30

Open
wbazant opened this issue Oct 5, 2024 · 0 comments
Open

Add bounding boxes for clusters #30

wbazant opened this issue Oct 5, 2024 · 0 comments

Comments

@wbazant
Copy link

wbazant commented Oct 5, 2024

Follow-up from falling-fruit/falling-fruit-web#423. Going to isolated clusters could be a nicer experience if we were able to zoom in just into their bounding box.

Implementation idea, without looking at the code: given a list of locations for a cluster and their centre, find max(lat), min(lat), max(lng), min(lng)?

The bounding boxes could be calculated optionally, maybe even with a hardcoded upper bound for a count, since they're most useful for sparsely populated places with a handful of locations.

For example: two locations in Ullapool town centre are visible as a cluster in https://beta.fallingfruit.org/map/@58.1014684,-5.5723643,8z but it takes three clicks to get to them.

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