Skip to content

feat: render_map_tool support for Mapbox Standard Satellite base style - #254

Open
mattpodwysocki wants to merge 2 commits into
mainfrom
feat/base-style-satellite
Open

feat: render_map_tool support for Mapbox Standard Satellite base style#254
mattpodwysocki wants to merge 2 commits into
mainfrom
feat/base-style-satellite

Conversation

@mattpodwysocki

Copy link
Copy Markdown
Contributor

Summary

Feature request (via Slack): support Mapbox Standard Satellite as a base map option for render_map_tool.

  • New baseStyle: "standard" | "standard-satellite" input field, defaulting to "standard" — existing behavior is unchanged unless a caller opts in.
  • "standard-satellite" loads Mapbox Standard Satellite — the same Standard style family (dynamic labels, bottom/middle/top slots for custom layers) rendered over global satellite imagery instead of a vector basemap. Confirmed against the Mapbox docs that it supports most, but not all, of baseMapConfig's properties (no theme, no flat-color overrides like colorWater/colorBuildings — there's no vector land/water surface under the imagery to recolor). Documented in docs/render-map-tool.md.
  • Threaded through the same way baseMapConfig already is: MapAppPayload/MapAppPayloadSchema, RenderMapInputSchema, and assemblePayload() (including as a renderable field on its own, matching baseMapConfig's existing "restyle with no new data" behavior).
  • mapAppHtml.ts picks the style URL from an explicit allowlist rather than interpolating the value directly, so an unrecognized baseStyle can never reach the style URL.
  • Deliberately kept to an enum of the two Mapbox Standard-family styles rather than an open string, to stay aligned with this project's existing move away from Classic styles (feat: switch render_map_tool's base style from streets-v12 to Standard #248).

Test plan

  • npx vitest run — all 944 tests pass, including new coverage in RenderMapTool.test.ts, mapAppPayload.test.ts, and mapAppHtml.script.test.ts (including a test that an unrecognized baseStyle value falls back to standard rather than being interpolated)
  • npm run build succeeds, lint clean
  • Live-verified in a real browser against the real Mapbox API: real satellite imagery loads via standard-satellite, with Standard's dynamic POI/road/place labels rendering on top and a custom route layer drawn correctly above it — screenshot included in docs/render-map-tool.md

🤖 Generated with Claude Code

New baseStyle: "standard" | "standard-satellite" field (defaults to
"standard") switches render_map_tool's base map to Mapbox Standard
Satellite -- the same Standard style family (dynamic labels,
bottom/middle/top slots, most baseMapConfig properties) rendered over
global satellite imagery instead of a vector basemap.

Threaded through the same way baseMapConfig already is: added to
MapAppPayload/MapAppPayloadSchema, RenderMapInputSchema, and
assemblePayload() (including as a renderable field on its own, like
baseMapConfig). mapAppHtml.ts picks the style URL from an explicit
allowlist rather than interpolating the value directly, so an
unrecognized baseStyle can never reach the style URL.

Verified live in a real browser against the Mapbox API: real satellite
imagery loads with Standard's dynamic POI/road/place labels on top and a
custom layer drawn correctly above it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@mattpodwysocki
mattpodwysocki requested a review from a team as a code owner August 25, 2026 19:50
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.

1 participant