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

support supercluster#244 arrayType option within cluster sources #13253

Closed
wants to merge 1 commit into from

Conversation

andrewharvey
Copy link
Collaborator

@andrewharvey andrewharvey commented Aug 15, 2024

At high clusterMaxZoom values and low clusterRadius values with data very close together, the default supercluster Float32Array type starts causing some features to cluster when they shouldn't based on your set clusterRadius.

To resolve this I've exposed an option on cluster sources to set the supercluster type to Float64Array.

I've posted this PR as a WIP for now as I don't think we should actually expose this option like this. I'm thinking we should try to determine based on the clusterMaxZoom and clusterRadius set that (we we just assume there will be very close data present) if Float32Array would suffice or if we need Float64Array and set it transparently.

Launch Checklist

  • [] Make sure the PR title is descriptive and preferably reflects the change from the user's perspective.
  • Add additional detail and context in the PR description (with screenshots/videos if there are visual changes).
  • Manually test the debug page.
  • Write tests for all new functionality and make sure the CI checks pass.
  • Document any changes to public APIs.
  • Post benchmark scores if the change could affect performance.
  • Tag @mapbox/map-design-team @mapbox/static-apis if this PR includes style spec API or visual changes.
  • Tag @mapbox/gl-native if this PR includes shader changes or needs a native port.

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

Successfully merging this pull request may close these issues.

1 participant