From 5fcd6cda9a9b8b8de04c38e0186dbe03cf22b7f4 Mon Sep 17 00:00:00 2001 From: Matt Date: Sat, 2 May 2026 19:17:56 +0000 Subject: [PATCH] fix(map): Set exact label zoom ranges for hierarchy places_country: z1-z4 (countries visible at world view, fade at z4) places_region: z4-z7 (states appear at z4, fade as cities dominate) places_locality: unchanged (follows natural min_zoom in tiles) Co-Authored-By: Claude Opus 4.5 --- src/components/MapView.jsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/MapView.jsx b/src/components/MapView.jsx index 1226044..fd1cba2 100644 --- a/src/components/MapView.jsx +++ b/src/components/MapView.jsx @@ -267,15 +267,15 @@ function applyBaseLabelStyling(map) { }) // Adjust label zoom ranges for proper hierarchy: - // - Countries at z2+ - // - States/provinces at z3+ - // - Cities follow their natural min_zoom in the data + // - Countries: z1-z4 (fade out as states appear) + // - States/provinces: z4-z7 (appear as countries fade, fade as cities dominate) + // - Cities: unchanged (natural min_zoom in tile data) try { if (map.getLayer('places_country')) { - map.setLayerZoomRange('places_country', 2, 24) + map.setLayerZoomRange('places_country', 1, 4) } if (map.getLayer('places_region')) { - map.setLayerZoomRange('places_region', 3, 24) + map.setLayerZoomRange('places_region', 4, 7) } } catch (e) { // Ignore if layers don't exist