mapbox / supercluster

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

Calling supercluster.load(Points) then calling supercluster.getClusters() my arbitrary properties data are gone #207

Closed luan-dang-techlabs closed 2 years ago

luan-dang-techlabs commented 2 years ago

Anyone having issue when using supercluster.load(Points),

e.g. Passing to supercluster.load(Points)

Points = { type: 'Feature', properties: { hi: 'world, } geometry: { type: 'Point', coordinates[,,]} }

e.g. Getting supercluster.getClusters(bound, 2);

Points = { type: 'Feature', properties: { cluster_id: z, // my data is gone but other properties for supercluster exist } geometry: { type: 'Point', coordinates[,,]} }

luan-dang-techlabs commented 2 years ago

I didn't realized I was looking at clusters and not individual non-cluster.

francescocretti commented 1 year ago

@luan-dang-techlabs I'm facing the same issue, can you explain better what you meant by "I was looking at clusters and not individual non-cluster" ?

luan-dang-techlabs commented 1 year ago

@francescocretti -From what I remember, clusters: those big blobs , non-clusters : individual data points. i was trying to find information for individual points but i was looking at the cluster instead. hope that helps.

francescocretti commented 1 year ago

@luan-dang-techlabs yes, that was it! thanks :)