You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It does not seem to render starting at zoom 4. But I need zoom 3 for the world view.
Does it somehow ignore/filter out or not get viewport at these zoom levels?
I resorted to temporary hack, but I assume something is not correct in the getPaddedViewport math:
class SharedSuperClusterViewportAlgorithm extends SuperClusterViewportAlgorithm {
public cluster({ map, mapCanvasProjection }: AlgorithmInput): Cluster[] {
let state: SuperClusterViewportState;
if (map.getZoom() <= 3) {
state = {
zoom: Math.round(map.getZoom()),
view: [-180, -90, 180, 90]
};
} else {
state = {
zoom: Math.round(map.getZoom()),
view: getPaddedViewport(
map.getBounds(),
mapCanvasProjection,
this.viewportPadding
),
};
}
return this.superCluster
.getClusters(state.view, state.zoom)
.map((feature: ClusterFeature<{ marker: any }>) =>
this.transformCluster(feature)
);
}
}
The text was updated successfully, but these errors were encountered:
Ketec
added
triage me
I really want to be triaged.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
labels
May 7, 2024
If you would like to upvote the priority of this issue, please comment below or react on the original post above with 👍 so we can see what is popular when we triage.
@Ketec Thank you for opening this issue. 🙏
Please check out these other resources that might help you get to a resolution in the meantime:
It does not seem to render starting at zoom 4. But I need zoom 3 for the world view.
Does it somehow ignore/filter out or not get viewport at these zoom levels?
new SuperClusterViewportAlgorithm({radius: 150, maxZoom: 16, viewportPadding: 50, minZoom: 3, minPoints: 5})
It looks like the bounds are broken at zoom 3?
I resorted to temporary hack, but I assume something is not correct in the getPaddedViewport math:
The text was updated successfully, but these errors were encountered: