-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Fix bug causing clusters to disappear when "clusterRadius" is very small #2898
Fix bug causing clusters to disappear when "clusterRadius" is very small #2898
Comments
Can you set up a minimal JSFiddle reproducing the behavior? |
Yeah, it seems to be a bug and somehow related to small cluster radius — changing the value in JSFiddle to 10 seems to fix the behavior. Needs investigating. |
Here's another example relating to heat maps. I just posted #4710 moments ago and realized this is basically the same issue. |
Is there an ETA for this being resolved? |
Got it working in my case, thanks to a tip from the mapbox team. I needed an extra layer for the _un_clustered markers. The problem was that once the clusters tried to separate into individual dots, there wasn't a layer to represent them. Adding a new layer with |
anyone figure out a solution to this? |
@jfhidakatsu see my comment right before yours. Are you having a different issue? |
Yes, I don't have any issue showing unclustered markers. The issue is showing clusters when zoomed in far. I solved it by setting max zoom to 17.9, as the clusters seem to disappear at 18. |
I have the same problem. Cluster breaks after 18 zoom. I have set my global maxzoom to 24, and my clusterMaxZoom to 24, but passed 18 zoom, my points are displayed as superposed single points instead of clusters. |
I noticed this as well. Zoom greater than 17.9 - unclusters. Related: #6454 (comment) |
Would be great if this was fixed sometime within the next decade. |
+1 waiting on fix for this |
+1 would be great to have a fix |
Sorry for the delay everyone, now I'll finally have the time to investigate this soon! Quite a weird issue. |
Finally got my hands on this — check out #10300 and let me know if there are any remaining issues with clustering. The fix should be included in v2.1. |
This is still an issue for me, when I zoom in I post items in the cluster, on zoom out a cluster would have 23 and then when you zoom it it shows just one item in that cluster |
mapbox-gl-js version: 0.21.0
Steps to Trigger Behavior
Add a Map source with options (https://www.mapbox.com/mapbox-gl-js/api/#GeoJSONSource):
doesn't produce the expected outcome.
Expected Behavior
I would expect that cluster layers using that source remain visible up to and including zoom level 20 (i.e. they never disappear)
The documentation for
cluserMaxZoom
indicates that by default this property is set to 1 less thanmaxzoom
but seems to imply that if set explicitly it'll honour that value. From what I can gather it is always returning the lower of the 2 between (maxzoom
- 1) and what is set forclusterMaxZoom
.Actual Behavior
What I actually see is that some layers disappear at zoom level 19, some at zoom level 18 and some at zoom level 17.
The text was updated successfully, but these errors were encountered: