Skip to content

explorer: turning off heatmap then zooming out doesn't restore clusters (if session started in heatmap) #262

@rdhyee

Description

@rdhyee

Repro

  1. Load the explorer in heatmap mode (e.g. a &heatmap=1 deep link, or toggle heatmap on before clusters load).
  2. Turn heatmap off.
  3. Zoom out.
    No clusters appear (empty globe).

Root cause (not by design — a gap)

The heatmap-off handler (#heatmapToggle change, explorer.qmd ~L3487) only does clearHeatmap() + applyLayerVisibility(). applyLayerVisibility() (~L2756) just sets .show flags:

viewer.h3Points.show = !heat && mode === 'cluster';
viewer.samplePoints.show = !heat && mode === 'point';

It reveals the cluster layer but never loads data into it. If the session lived entirely in heatmap, viewer.h3Points was never populated for the current view → empty layer. Zooming out should reload via the camera handler, but that load is guarded by if (target !== currentRes); with a stale currentRes the reload is skipped → still no clusters.

Fix direction (touches the #233 mutual-exclusive mode state machine — tricky)

On heatmap-off, force a re-evaluation + data load for the current altitude rather than only flipping visibility: e.g. invalidate currentRes (set null) and call the camera handler's mode-eval path (loadRes for the current zoom / tryEnterPointModeIfNeeded), so the altitude-appropriate marker layer actually loads.

Severity

Low / narrow path (start-in-heatmap → off → zoom out). Not keynote-critical. Reported by RY 2026-06-02.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions