feat: render_map_tool support for Mapbox Standard Satellite base style - #254
Open
mattpodwysocki wants to merge 2 commits into
Open
feat: render_map_tool support for Mapbox Standard Satellite base style#254mattpodwysocki wants to merge 2 commits into
mattpodwysocki wants to merge 2 commits into
Conversation
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>
…lite # Conflicts: # CHANGELOG.md
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.
Summary
Feature request (via Slack): support Mapbox Standard Satellite as a base map option for
render_map_tool.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/topslots 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, ofbaseMapConfig's properties (notheme, no flat-color overrides likecolorWater/colorBuildings— there's no vector land/water surface under the imagery to recolor). Documented indocs/render-map-tool.md.baseMapConfigalready is:MapAppPayload/MapAppPayloadSchema,RenderMapInputSchema, andassemblePayload()(including as a renderable field on its own, matchingbaseMapConfig's existing "restyle with no new data" behavior).mapAppHtml.tspicks the style URL from an explicit allowlist rather than interpolating the value directly, so an unrecognizedbaseStylecan never reach the style URL.Test plan
npx vitest run— all 944 tests pass, including new coverage inRenderMapTool.test.ts,mapAppPayload.test.ts, andmapAppHtml.script.test.ts(including a test that an unrecognizedbaseStylevalue falls back tostandardrather than being interpolated)npm run buildsucceeds, lint cleanstandard-satellite, with Standard's dynamic POI/road/place labels rendering on top and a custom route layer drawn correctly above it — screenshot included indocs/render-map-tool.md🤖 Generated with Claude Code