Repository navigation
Comparison: stack each side's layers in the map's z-index order - #564
Merged
Merged
Conversation
The Comparison tool lists layers top-first, while deck.gl draws index 0 at the bottom, so cloning in the caller's order inverted the stack and buried vector layers under rasters. Each side now draws its layers in the registry's z-index order, matching the primary map.
BhattaraiSijan
approved these changes
Oct 8, 2026
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
In comparison mode, layer ordering was ignored: vector layers were drawn underneath raster layers on both sides of the divider (e.g. Air4US with the AQS vector layers over TEMPO HCHO, comparing Feb 27 vs Feb 28, 2025).
Cause
The Comparison tool hands core its visible layers in config order, which is top-first. deck.gl renders index 0 at the bottom, and
_comparisonClonesForcloned layers in the order it was given, so each side's stack came out inverted.Fix
DeckGLAdapter._comparisonClonesFornow walks the layer registry, which is already sorted by z-index, and keeps the requested ids. The caller's list decides which layers each side draws; the engine decides their stacking, so both sides match the primary map, including after a user reorders layers.Testing