mapbox / supercluster

A very fast geospatial point clustering library for browsers and Node.
ISC License
2.12k stars 300 forks source link

The clustering behavior is strange when the zoom level is above 20 #243

Open strstrst opened 11 months ago

strstrst commented 11 months ago

Supercluster stores all positions internally on a 32-bit floating point array. When it converts these positions to 32 bits with Math.fround, 2 different positions can be converted to the same position. As a result, these 2 positions are always clustered. Could you add a parameter to configure the use of Math.fround?

andrewharvey commented 3 months ago

See https://github.com/mapbox/supercluster/pull/244