Skip to content

Add array type for storing coordinate values to allow improving accuracy for small radius - #244

Closed
ewelinaBS wants to merge 1 commit into
mapbox:mainfrom
ewelinaBS:main
Closed

Add array type for storing coordinate values to allow improving accuracy for small radius#244
ewelinaBS wants to merge 1 commit into
mapbox:mainfrom
ewelinaBS:main

Conversation

@ewelinaBS

@ewelinaBS ewelinaBS commented Jan 5, 2024

Copy link
Copy Markdown

For small radius <~50cm, the clustering is not accurate. (Probably the accuracy will be different depending on the latitude.) The problem originates from rounding the coordinates to float32.

Work done

Enable arrayType argument for supercluster constructor to determine in what format store the coordinates values.
Default Float32Array value will work the same as before.

@andrewharvey

Copy link
Copy Markdown
Contributor

I've added a unit test for this in #249

@klyakh

klyakh commented Aug 1, 2026

Copy link
Copy Markdown

I had to switch back to GridAlgorithm instead of SuperClusterAlgorithm. I have situations where many markers are on the same building with almost the same position. So when user zooms in to 20 or above, clusters become problematic:

  • some very close markers are not clustered, even though they are on almost the same position
  • some clusters have standalone markers very close to them, basically overlapping with cluster marker; they should be included in the cluster.

@mourner

mourner commented Aug 1, 2026

Copy link
Copy Markdown
Member

This should be resolved by #258

@mourner mourner closed this Aug 1, 2026
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.

4 participants