Skip to content

Keep wetland fills off chart detail in composed styles - #116

Open
bkeepers wants to merge 2 commits into
own-the-base-mapfrom
wetlands-composed
Open

bkeepers wants to merge 2 commits into
own-the-base-mapfrom
wetlands-composed

Conversation

@bkeepers

@bkeepers bkeepers commented Nov 3, 2026

Copy link
Copy Markdown
Member

layers() now returns the two wetland fills in groups of their own, so a style composed from the README recipe can't paint them over chart detail. flats holds the opaque tidal-flat drying tint and goes over the depth tints, under contours and soundings. marsh holds the marsh tuft overlay and goes on the land fills, under the coastline and labels.

Stacked onto #63, which added both layers. There the flats sat at the start of areas and the marsh at the start of symbols, so [...myBaseLayers, ...areas, ...myLandLayers, ...symbols] drew the drying tint over a composer's soundings and contours, and marsh tufts over their coastline and land labels. style() worked around this by pulling both layers out by id. It now places flats and marsh directly, and the whole style's layer order is unchanged.

  • chartLayers() and layers() return { flats, areas, marsh, symbols }. style() uses the groups instead of filtering by id.
  • The README "Composed" recipe shows where each group goes. The layers() entry, the module table, and the code comments describe the four groups.
  • The pinned id-order test asserts flats and marsh separately. A new test builds the README recipe over seascape's bathymetry and checks that tidal-flats sits under contour-lines, contour-labels and soundings, and that marshes sits under a coastline and a place label. It also checks that areas and symbols hold no wetland-layer layers.

Semver

This changes the layers() return shape of @openwaters/seamap. Measured against the last release (0.3.2), it's only additive: tidal-flats and marshes first appear in #63, and every id 0.3.2 put in areas and symbols is still there in the same order. If this ships in the same release as #63, the release is minor (0.4.0, which #63's new layers already need). If #63 ships first, this moves ids out of areas/symbols. Under the versioning policy that is a breaking reorder, which in 0.x means the next minor bump.

Review

No model review ran on this PR: the openwaters-review rounds weren't run. Verification: npm test --workspace style (48 tests, with the sprite sheet built), npm run lint, and npx oxfmt --check all pass.

🤖 Generated with Claude Code

layers() now returns the tidal-flat drying tint as `flats` and the marsh overlay as `marsh`, beside `areas` and `symbols`. Before, the flats rode at the bottom of `areas` and the marsh at the bottom of `symbols`. A composer following the README stacked them over their own contours, soundings, coastline and land labels. style() already worked around this by filtering both layers out by id. It now places the two groups directly, with the same resulting layer order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings November 3, 2026 03:17

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.

🔵 Needs a closer look

The public layers() return-shape change has semver implications that depend on whether stacked PR #63 ships first, so release ordering and the next minor version require human verification.

No open issues 🎉

What changed in this PR

This pull request separates wetland fills into dedicated layer groups so composed MapLibre styles can position tidal flats beneath chart detail and marsh patterns beneath coastlines and labels, while preserving the complete style’s existing order.

Changes:

  • Splits layers() and chartLayers() into flats, areas, marsh, and symbols.
  • Updates style() and the README composition recipe for correct wetland placement.
  • Expands tests for layer ordering, wetland placement, stable IDs, and tag-filter coverage.
File Description
style/​taginfo.test.ts Walks all four chart-layer groups when checking documented OSM keys.
style/​README.md Documents the four-group composition API and required placement order.
style/​layers/​index.ts Separates tidal-flat and marsh layers into dedicated groups.
style/​index.ts Exposes the new groups and places wetland layers correctly in the assembled style.
style/​index.test.ts Verifies composed and complete-style wetland ordering, stable IDs, group contents, and filtering.

Review effort: Lite

…ds-composed-sync

* origin/own-the-base-map:
  Draw unknown-depth water in seascape's hazard tint

# Conflicts:
#	style/index.ts

This branch has not been deployed

No deployments
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