Fix seamap depth bands disappearing after load - #78
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
openwaters-api | ebfbdb0 | Commit Preview URL Branch Preview URL |
Aug 14 2026, 08:26 PM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
openwaters-io | ebfbdb0 | Commit Preview URL Branch Preview URL |
Aug 14 2026, 08:26 PM |
There was a problem hiding this comment.
Pull request overview
Fixes a regression where Seamap’s vector depth bands briefly render and then disappear after the map finishes loading, caused by applyState defaulting shading to "relief" during the initial setUnit("m") call.
Changes:
- Pass an explicit
shadingmode intoapplyStateduringsetUnit, selecting"bands"for Seamap and"relief"for Seascape. - Add inline comments documenting why the explicit shading is required for Seamap.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
The seamap chart loads with its vector depth bands showing, then hides them the moment the map finishes loading. The viewer calls
setUnit("m")on load, which runsapplyState(map, { unit, safety })— and seascape'sapplyStatedefaultsshadingto"relief", rewriting the depth-areas filter into relief mode and filtering the bands out above z6.The fix passes the shading mode each chart's style.json actually ships:
bandsfor seamap,relieffor seascape.One thing to watch: seascape HEAD adds a
hillshadeparameter toapplyStatethat defaults totrue. The published 0.2.1 this site installs doesn't have it, but when the dependency is bumped, the seamap call will also needhillshade: falseto keep its hillshade layer hidden.