Skip to content

Fix seamap depth bands disappearing after load - #78

Merged
bkeepers merged 1 commit into
mainfrom
fix-seamap-viewer-shading
Aug 14, 2026
Merged

Fix seamap depth bands disappearing after load#78
bkeepers merged 1 commit into
mainfrom
fix-seamap-viewer-shading

Conversation

@bkeepers

Copy link
Copy Markdown
Member

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 runs applyState(map, { unit, safety }) — and seascape's applyState defaults shading to "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: bands for seamap, relief for seascape.

One thing to watch: seascape HEAD adds a hillshade parameter to applyState that defaults to true. The published 0.2.1 this site installs doesn't have it, but when the dependency is bumped, the seamap call will also need hillshade: false to keep its hillshade layer hidden.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 14, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 14, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 shading mode into applyState during setUnit, 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.

@bkeepers
bkeepers merged commit 04ce13b into main Aug 14, 2026
3 checks passed
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.

2 participants