Skip to content

fix: switch basemap fallback from Stadia Maps to OpenFreeMap#1042

Merged
koala73 merged 1 commit intomainfrom
fix/basemap-openfreemap-fallback
Mar 5, 2026
Merged

fix: switch basemap fallback from Stadia Maps to OpenFreeMap#1042
koala73 merged 1 commit intomainfrom
fix/basemap-openfreemap-fallback

Conversation

@koala73
Copy link
Owner

@koala73 koala73 commented Mar 5, 2026

Summary

  • Switch fallback basemap from Stadia Maps to OpenFreeMap (free, no auth, proper CORS)
  • Replace overly broad style.json error match with cartocdn.com
  • Store style load timeout on instance and clear in destroy() to prevent stale callbacks
  • Update TODO-131 roadmap text

Fixes #1031

Root cause

PR #1037 added Stadia Maps as fallback, but Stadia tiles return HTTP 401 without an API key. The style.json loads fine, but actual .pbf tile requests fail silently — map stays black with data points floating on nothing.

OpenFreeMap serves tiles with no authentication, no rate limits, and Access-Control-Allow-Origin: *. Dark style available at tiles.openfreemap.org/styles/dark.

Test plan

  • Deploy preview → verify map loads with OpenFreeMap dark basemap when CARTO is blocked
  • Verify no fallback warnings when CARTO is working normally
  • Verify theme switching respects fallback state
  • Verify 5s timeout triggers fallback if style never loads

Stadia Maps tiles return HTTP 401 without an API key — style.json loads
but actual .pbf tile requests fail, leaving the map black with floating
data points (issue #1031).

Changes:
- Switch fallback to OpenFreeMap (free, no auth, CORS *, dark style)
- Replace overly broad 'style.json' error match with 'cartocdn.com'
- Store style load timeout on instance, clear in destroy()
- Update TODO-131 text to reference OpenFreeMap
@vercel
Copy link

vercel bot commented Mar 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
worldmonitor Ready Ready Preview, Comment Mar 5, 2026 5:10am

Request Review

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@koala73 koala73 merged commit 383f2e9 into main Mar 5, 2026
4 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.

Map not rendering (black screen) — CORS error blocking basemaps.cartocdn.com style.json

1 participant