-
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
How can supercluster be integrated with Mapbox-GL-JS? #34
Comments
Supercluster is already integrated into Mapbox GL JS — it is the library that gives it its clustering features. |
Oh, I see, thanks @mourner |
Once we can get the cluster members from some method in Mapbox GL (getLeaves, or whatever it will be), we'll have everything we need to manually do that decluster effect (used to be called "spiderfying," I think). I'm anxiously awaiting the addition of these supercluster methods in the Mapbox GL API :) |
@mourner thanks for the support you have given on this. I am using the Superclustering class and not able to pool the info tooltip on a marker. Can't also find any documentations. Can you help please? |
For ReactJS lover, here is a solution for clustering (using supercluster) in mapbox-gl: |
Do you guys have an example of how to get the cluster and use all superclusters available methods ( |
Hey @maufarinelli, the integration is coming in mapbox/mapbox-gl-js#6829, which also includes an example. Check it out! |
AMAZING @mourner . Thanks you so much |
Hello @mourner Well there doesn't seem to be any simple example of what supercluster can do on the website or the repo. A simple example using something else that point_count to change the size/color of cluster would be a nice addition. Especially since not a lot of documentation is available on how to use supercluster and the only example online is broken and using old and deprecated code. The only current example is: https://www.mapbox.com/mapbox-gl-js/example/cluster/ It does not offer the possibility to do anything about the cluster size or color based on other properties than point_count. The other example that is using deprecated code is: https://bl.ocks.org/ryanbaumann/01b2c7fc0ddb7b27f6a72217bd1461ad unfortunately, this example is fairly complex to understand and also crashes when you zoom in too much. I am currently trying to make it work but I have to admit that I am facing quite a lot of challenge. A nice and data-driven cluster example would be very nice as an addition to the list of example that you have online. I even opened that SO question for that matter . |
And if it can't how can we take advantage of similarly advanced clustering features in mapbox.gl.js?
The text was updated successfully, but these errors were encountered: