Skip to content

fix: remove emrldco analytics and improve basemap fallback#1052

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

fix: remove emrldco analytics and improve basemap fallback#1052
koala73 merged 1 commit intomainfrom
fix/csp-basemap-fallback

Conversation

@koala73
Copy link
Owner

@koala73 koala73 commented Mar 5, 2026

Summary

  • Remove emrldco.com analytics — script loader and CSP entries stripped from index.html, vercel.json, and tauri.conf.json
  • Fix basemap fallback reliability — when Carto returns 403 (intermittent), the old setStyle() approach left MapLibre in a broken state where the map never rendered. Now we remove() the failed map and create a fresh one with the OpenFreeMap fallback URL
  • Broader error detection — added 403/Forbidden to the error pattern matching
  • Scoped fallback — only recreate the map for pre-style-load errors; post-load tile errors are ignored (single tile failure ≠ basemap failure)

Context

A user reported a blank map + console errors. Root cause: Carto style.json returned 403 intermittently, and setStyle() on a map whose initial style never loaded doesn't reliably recover MapLibre's rendering pipeline.

Test plan

  • Verify map loads normally (Carto working → no change in behavior)
  • Simulate Carto failure (block basemaps.cartocdn.com in DevTools Network) → map should recreate with OpenFreeMap within 5s
  • Verify no emrldco.com script or CSP references remain
  • Theme toggle (dark↔light) still works after fallback

- Remove emrldco.com analytics script and CSP entries from index.html,
  vercel.json, and tauri.conf.json
- Replace setStyle() basemap fallback with full map recreation — setStyle()
  after a failed initial style load leaves MapLibre in a broken state
- Add 403/Forbidden to error detection patterns for basemap failures
- Scope fallback to pre-style-load errors only (post-load tile errors
  don't warrant destroying a working map)
@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.

@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 8:18am

Request Review

@koala73 koala73 merged commit fccfa79 into main Mar 5, 2026
3 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.

1 participant