Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/pages/map/components/Clustering.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export function Clustering({ category, children }) {
return (
<>
<GeoJSON ref={featureRef} data={null} pointToLayer={createClusterIcon} />
{children.length > rules.forcedLimit || userCluster
{(children.length > rules.forcedLimit || userCluster) && !IGNORE_CLUSTERING.has(category)

Copilot AI Nov 25, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix on line 150 prevents filtering children for IGNORE_CLUSTERING categories, but there's an inconsistency: if userCluster is true for a category in IGNORE_CLUSTERING, line 85 would still create a superCluster instance, causing cluster icons to be rendered via the GeoJSON component (line 149), while line 150 now renders all individual children. This would result in both cluster markers and individual markers being displayed simultaneously.

Consider also checking !IGNORE_CLUSTERING.has(category) at line 85 to prevent cluster creation entirely for these categories:

if ((limitHit || userCluster) && !IGNORE_CLUSTERING.has(category)) {

Copilot uses AI. Check for mistakes.
? children.filter((x) => x && markers.has(x.key))
: children}
{limitHit && (
Expand Down
Loading