Skip to content

Fix overlay layers not working properly#880

Merged
JeroenDeDauw merged 2 commits intomasterfrom
fix/overlay-layers-not-working
Apr 5, 2026
Merged

Fix overlay layers not working properly#880
JeroenDeDauw merged 2 commits intomasterfrom
fix/overlay-layers-not-working

Conversation

@JeroenDeDauw
Copy link
Copy Markdown
Member

Fixes #642

In addLayersAndOverlays(), the layer control was initialized with an empty
array [] for base layers, then base layers were added individually via
control.addBaseLayer(). This caused overlays to not layer correctly.
Pass base layers as a proper object to L.control.layers() directly.

@JeroenDeDauw JeroenDeDauw force-pushed the fix/overlay-layers-not-working branch 2 times, most recently from ccc030f to a176f6d Compare April 5, 2026 20:08
JeroenDeDauw and others added 2 commits April 5, 2026 22:31
Fixes #642

In `addLayersAndOverlays()`, the layer control was initialized with an empty
array `[]` for base layers, then base layers were added individually via
`control.addBaseLayer()`. This caused overlays to not layer correctly.
Pass base layers as a proper object to `L.control.layers()` directly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Verifies that addLayersAndOverlays passes a proper object (not an
empty array) as base layers to L.control.layers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@JeroenDeDauw JeroenDeDauw force-pushed the fix/overlay-layers-not-working branch from a176f6d to 0913337 Compare April 5, 2026 20:32
@JeroenDeDauw JeroenDeDauw marked this pull request as ready for review April 5, 2026 20:41
@JeroenDeDauw JeroenDeDauw merged commit 0f9b5d4 into master Apr 5, 2026
6 checks passed
@JeroenDeDauw JeroenDeDauw deleted the fix/overlay-layers-not-working branch April 5, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Overlaylayers not working

1 participant