mapbox / supercluster

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

Can you retain original properties from GeoJSON source? #197

Closed comatory closed 2 years ago

comatory commented 2 years ago

When calling load on Supercluster instance, it replaces properties and id with its own generated data required for clustering.

Is there a way to map points generated by the library to original points I used as a source?

mourner commented 2 years ago

Not sure I fully understand the context of the question, but when you request features from Supercluster, it returns original features for unclustered points:

https://github.com/mapbox/supercluster/blob/f073fade1caae0b2b1beffd013b74ff024ff413b/index.js#L88