Replies: 5 comments 1 reply
-
I'm having a hard time understand what the problem is as the steps to reproduce are not clear. Can you please elaborate? |
Beta Was this translation helpful? Give feedback.
-
Steps to reproduce:
OR
This duplication is intentional — we have a valid use case where multiple locations share the exact same latitude and longitude. We expect these to form a cluster, and when clicked and zoomed at max zoom level eventually expand into spiderfied markers. However, zooming into such clusters appears to be broken, likely due to how the algorithm handles overlapping points in a cluster. |
Beta Was this translation helpful? Give feedback.
-
Here is video |
Beta Was this translation helpful? Give feedback.
-
This happens with the globe and default projections but is especially visible with globe projection |
Beta Was this translation helpful? Give feedback.
-
You are using query rendered features to get the location of the cluster, the accuracy of this is zoom dependant so When I click the cluster for the first time I get these coordinates:
But when I click the second time I'm getting this:
This is not the right way to get accurate location if you would like to zoom into the cluster itself... |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
maplibre-gl-js version: 5.5.0
browser: Brave
Steps to Trigger Behavior
Link to Demonstration
https://jsfiddle.net/yunz93oh/
Expected Behavior
Clicking on a cluster should zoom in so that the cluster is visible, within the map bounds, and roughly centered at the new zoom level.
Actual Behavior
Clicking on a cluster never zooms to the cluster but somewhere near it making it not visible as expected or a the edge of bound.
By setting maxZoom level map to 17 and not setting Source maxClusterZoom I would expect the zooming in to a cluster to show it at the center when zoomed but instead it always lands around somewhere sometimes even far away from the actual cluster coordinates. I believe there is some bug with calculations where there are multiple markers stacked on top of each other in a cluster??
Beta Was this translation helpful? Give feedback.
All reactions