Repository navigation
refactor: make MultiCOGLayer extend RasterTileLayer - #499
Merged
Merged
Conversation
Refs #417. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Adds a protected hook returning [] by default. Subclasses (next commit: MultiCOGLayer) override it to render per-tile overlays that depend on the fetched DataT, without overriding _renderSubLayers itself. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Drops ~165 lines of duplicated wiring (globe/mercator branching, signal combining, RasterLayer construction, RasterTileset2D factory subclass) that RasterTileLayer already provides. Multi-source fetch + stitch logic stays in _getTileData (now consuming options.signal); rich per-band debug overlay moves to the new _renderExtraSubLayers hook on the base class. Public API unchanged. Refs #417. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…t outline into it Renames _renderExtraSubLayers -> _renderDebug and pulls the previously- inline renderDebugTileOutline call into the hook's default body. Subclasses that want to extend the debug overlay can now call super._renderDebug(...) to get the primary outline, or override entirely. The hook is gated by props.debug in the base, so subclass implementations don't repeat the check. Side benefit: removes a minor regression where MultiCOGLayer was double- stamping the primary tile outline (base inline + its own _renderDebugLayers both drew it). The override now falls back to super for loading states and delegates to _renderDebugLayers (which carries the rich per-band overlay) once data is available. The hook signature accepts data as DataT | null since it now fires pre-data-arrival as well, so the default outline still renders during loading. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
MultiCOGLayer extend RasterTileLayer
kylebarron
enabled auto-merge (squash)
May 4, 2026 17:32
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.
Summary
MultiCOGLayerto extendRasterTileLayerinstead ofCompositeLayer. Drops ~165 lines of duplicated wiring (globe/mercator branching, signal combining,RasterLayerconstruction,RasterTileset2Dfactory subclass) — all already provided byRasterTileLayer.MultiCOGLayer._getTileData(now consuming the base's combinedoptions.signalinstead of recomposing)._renderExtraSubLayers(tile, data)hook onRasterTileLayerthat subclasses can override; default returns[].MultiCOGLayerPropsand runtime behavior unchanged.Spec:
dev-docs/specs/2026-05-01-multi-cog-layer-extends-raster-tile-layer-design.mdSee #417. First of three planned PRs (this one is the mechanical refactor; follow-ups will add the new
getTileData/renderTileextension points and an NLCD animation example).