From 376a644ecebdb2469e8468849cf7e2b2db940324 Mon Sep 17 00:00:00 2001 From: Anastasiia Ivanchenko Date: Tue, 14 Jul 2026 10:15:58 +0300 Subject: [PATCH 1/4] Show cached patches as blue boxes on the map --- src/components/layout/Nav.tsx | 19 +++++++++ src/components/map/EarthMap.tsx | 33 +++++++++++++++- src/components/map/GlobeSelectionOverlay.tsx | 28 ++++++++++++- src/icons/CacheIcon.tsx | 18 +++++++++ src/lib/cache/lru.ts | 5 +++ src/lib/constants/theme.ts | 4 ++ src/lib/map/geogrid.test.ts | 16 ++++++++ src/lib/map/geogrid.ts | 36 +++++++++++++++-- src/lib/map/selectionStyle.ts | 14 +++++++ src/lib/zarr/ZarrChunkReader.ts | 41 ++++++++++++++++++++ 10 files changed, 208 insertions(+), 6 deletions(-) create mode 100644 src/icons/CacheIcon.tsx diff --git a/src/components/layout/Nav.tsx b/src/components/layout/Nav.tsx index fa1f637..aef2246 100644 --- a/src/components/layout/Nav.tsx +++ b/src/components/layout/Nav.tsx @@ -6,6 +6,7 @@ import { NavActions } from "@/components/nav/NavActions"; import { IconButton } from "@/components/ui/IconButton"; import { CrosshairIcon } from "@/icons/CrosshairIcon"; import { PatchIcon } from "@/icons/PatchIcon"; +import { CacheIcon } from "@/icons/CacheIcon"; import type { MapViewMode } from "@/types/map"; type NavProps = { @@ -15,6 +16,8 @@ type NavProps = { onZoomToSelection?: () => void; showPatch?: boolean; onTogglePatch?: () => void; + showCached?: boolean; + onToggleCached?: () => void; }; export function Nav({ @@ -24,6 +27,8 @@ export function Nav({ onZoomToSelection, showPatch = false, onTogglePatch, + showCached = false, + onToggleCached, }: NavProps) { return (