fix: crisp territory boundaries at high zoom + stop power plant flashing#15
Merged
victorquinn merged 1 commit intomainfrom Feb 24, 2026
Merged
fix: crisp territory boundaries at high zoom + stop power plant flashing#15victorquinn merged 1 commit intomainfrom
victorquinn merged 1 commit intomainfrom
Conversation
Territory detail: - Removed @turf/simplify pre-processing that was destroying boundary detail at all zoom levels (0.05° = 5.5km tolerance was too aggressive) - Now using original full-resolution geometry with geojson-vt's built-in zoom-dependent simplification: rough at zoom 5-6 (many polygons visible, few pixels each), crisp at zoom 9-10 (few polygons visible, many pixels) - Zoom gating still in place: large utilities at 7-8, all at 9+ Power plant flashing: - Replaced two-tier layer system (major at 8-9, all at 10+) with a single layer at zoom 8+. The maxZoom:9 on the major layer caused a tile-loading race during zoom transitions — plants would vanish as one layer disappeared before the next loaded. - Points are lightweight; a single layer with all plants is fine. Removed @turf/simplify and @turf/helpers dependencies (no longer needed).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Blocky territories — pre-simplification with @turf/simplify at 0.05° (5.5km) tolerance destroyed boundary detail at ALL zoom levels. Territories looked blocky even at zoom 9-10 where they should be crisp.
Power plants flashing — the two-tier layer system (major plants at zoom 8-9, all plants at zoom 10+) caused a tile-loading race during zoom transitions. When zooming from 9→10, the major layer would disappear before the 'all' layer loaded, making plants flash in and out.
Fix
Territories: Removed @turf/simplify pre-processing entirely. Now using original full-resolution geometry with geojson-vt's built-in zoom-dependent simplification:
Zoom gating unchanged: large utilities (>50K customers) at zoom 7-8, all territories at zoom 9+.
Power plants: Replaced two-tier system with a single layer at zoom 8+. Points are lightweight; no need for the major/all split. No more flashing.
Cleanup: Removed @turf/simplify and @turf/helpers dependencies.