-
Notifications
You must be signed in to change notification settings - Fork 298
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 preclustering filtering #11
Comments
I don't think this should be done on the supercluster side — you can just do |
Agreed. Bringing in |
so how does it the filtering for clusters from geojson works? I need to filter dynamiclally (on user interactions). so it would be nice to use the standard filter functionality in mapbox |
I'm not a Javascript expert, but I'm curious about the ramifications of filtering geoJSON points before passing the result to supercluster. Let's say I want my user to be able to filter results in the GUI. If I have to filter before passing the results to SC, does that mean I need to keep two copies of my data? I'd need to keep one copy of the full dataset (so that I can apply filters to it each time the user changes filtering criteria), and then a second copy of just the filtered data that I pass to supercluster. For a dataset of hundreds of thousands or millions of points, that's a lot of memory spent on two copies of data, isn't it? If supercluster did the filtering internally with a filter() property, then only one copy of the data would have to be kept in memory. (Although clusters would of course have to be recomputed when filters are applied.) I may be misunderstanding how Javascript manages memory in this scenario. If I am, I apologize. |
Allow users to filter features before they are clustered.
cc @lyzidiamond @mourner
The text was updated successfully, but these errors were encountered: