Repository navigation
Fix/basemap picker availability - #13
Merged
Merged
Conversation
Config-load only drops basemap entries whose provider key env var is UNSET — a set-but-invalid/plan-limited key still lists every style, so the picker showed blank previews that broke when clicked. Probe each entry's preview tile client-side and remove failing tiles (pruning emptied group sections, hiding the control if <2 remain). The current basemap is never removed since it is demonstrably rendering. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds Terra Draw's TerraDrawFreehandMode as a fifth toolbar tool
('freedraw'). Finished freehand shapes produce Polygon geometry and
re-enter the existing pipeline as draw_type 'polygon', so the server
and SDK need no new type; enable_drawing accepts 'freehand'/'freedraw'
aliases. Styled with the shared area styles and included in the
theme-flip restyle observer.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… light mode - An explicit ?theme= from the embedding page now wins over the stored map-level theme on session_snapshot restore (same pinning rule as ?basemap=). Previously every WS (re)connect replayed the persisted or 'auto' theme over the boot param, flipping a light-booted page's controls dark (or resolving 'auto' to the OS preference regardless of the embedder's theme). Live set_theme broadcasts still apply. - The canvas surround behind the globe is space — keep it deep navy in both themes instead of binding to --eo-bg, which rendered a white void behind the planet in light mode. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…wing - MapLibre's stock control hover (.maplibregl-ctrl button:hover → translucent rgba(0,0,0,.05)) outranked the picker's themed hover on specificity, replacing the trigger's solid surface with near- transparency over the map. Re-assert the themed surfaces (trigger, tiles, draw-toolbar buttons) at higher specificity — hover is now just the border/surface highlight. - Keep the live Terra Draw sketch (td-*) and dashed pending previews above every asset layer: new overlays append to the top of the style and reorder/move_layer lift assets, either of which buried an in-progress drawing. raiseDrawLayers() re-tops them after any asset layer add, move_layer, and reorder_assets. - Crosshair cursor while a draw mode is armed (same class-on-canvas pattern as delete mode) — the grab cursor read as "pan", hiding that the map was ready for sketching. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Map shell fixes: basemap picker, theme pinning, draw layering, freehand
Base:
main· 4 commits ·server/mapcontrol_server/main.py(+108 / −10)A batch of fixes to the served map shell surfaced while working through the EOGPT
map drawer, plus a new freehand draw mode.
What changed
Hide unavailable basemaps from the picker (
9f745ff)Config-load only drops basemap entries whose provider key env var is unset — a
set-but-invalid/plan-limited key still listed every style with blank previews that
broke on click. The picker now probes each entry's preview tile client-side and
removes failing tiles (pruning emptied group sections, hiding the control if <2
remain). The current basemap is never removed.
Freehand polygon draw mode (
7327306)Adds Terra Draw's
TerraDrawFreehandModeas a fifth toolbar tool. Finished shapesare Polygon geometry and flow through the existing pipeline as
draw_type: 'polygon', so no server/SDK/consumer changes are needed;enable_drawingaccepts
'freehand'/'freedraw'. Included in the theme-flip restyle observer.Pin
?theme=against snapshot replay; keep the globe surround dark (83c2368)?theme=from the embedding page now wins over the stored map-leveltheme on
session_snapshotrestore (same rule as?basemap=). Previously everyWS (re)connect replayed the persisted/
autotheme over the boot param, flippinga light-booted page's controls dark (or resolving
autoto the OS preferenceregardless of the embedder). Live
set_themebroadcasts still apply.instead of
--eo-bg, which rendered a white void behind the planet in light mode.Picker hover, sketch layering, draw cursor (
8624b28).maplibregl-ctrl button:hover(translucent) outranked thepicker's themed hover on specificity, blanking the trigger over the map on hover.
Re-asserted the themed surfaces (trigger, tiles, draw-toolbar) at higher
specificity — hover is now just the border/surface highlight.
td-*) and dashed pending previews above everyasset layer via
raiseDrawLayers(), called after each asset add,move_layer,and
reorder_assets— they could otherwise be buried by new overlays/reorders.delete mode); the grab cursor read as "pan."
Testing
python -c "import mapcontrol_server.main"imports clean (f-string HTML intact).against the local stack via the dev-mc2 compose override.
Notes for reviewers
bug; the eogpt half (forwarding
set_themeon theme change) ships in that repo.main.py; there are noPython API or model changes.