Skip to content

fix(frontend): load map tiles from CARTO's rastertiles endpoint - #630

Merged
JuliusHenke merged 3 commits into
masterfrom
claude/project-thread-id0mp4
Oct 20, 2026
Merged

JuliusHenke merged 3 commits into
masterfrom
claude/project-thread-id0mp4

Conversation

@JuliusHenke

@JuliusHenke JuliusHenke commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Requested by ju · project thread

What

Some tiles of the dark map render with a lighter, bluish water colour (#2e353b) while the rest use #262626, so the map shows tile-aligned rectangles at every zoom level.

The affected tiles don't follow the {s} subdomain rotation, and the frontend draws only a single tile layer, so the mismatch is coming from the tiles CARTO serves. Since CARTO started requiring a key (db971a8), the endpoint it documents is basemaps.cartocdn.com/rastertiles/dark_all/.... We were still using the legacy {s}.basemaps.cartocdn.com/dark_all/... path.

Changes

  • Use https://basemaps.cartocdn.com/rastertiles/dark_all/{z}/{x}/{y}{r}.png?key=… (same key, no subdomains)
  • Replace the a/b/c subdomain preconnects in index.html with the single host
  • The map container and loading splash backgrounds now use the tiles' water colour #2e353b, so the area outside the tiles matches
  • PR preview channels now expire after 7 days instead of 30. The 30-day previews had filled up the Firebase Hosting channel quota, which made Deploy Preview fail.

Testing

  • tsc --noEmit and eslint pass
  • The preview deploy confirmed that every tile now renders the same style (checked by @JuliusHenke)

🤖 Generated with Claude Code

https://claude.ai/code/session_01PdYR45tHetg1e9kVBQhLvM

The legacy {s}.basemaps.cartocdn.com/dark_all URLs return some tiles in a
different style, which shows up as lighter rectangles on the dark map.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PdYR45tHetg1e9kVBQhLvM
@JuliusHenke JuliusHenke self-assigned this Oct 20, 2026

Copy link
Copy Markdown
Member Author

code/snyk (JuliusHenke) reports an error with "Code test limit reached". That is the Snyk account's Code test quota running out, not a problem with this diff (one tile URL and the preconnect hosts). There's no fix to port from this PR. It should pass once the quota resets or the check is re-run from Snyk. I can't re-run a Snyk commit status from here.


Generated by Claude Code

@gitguardian

gitguardian Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Copy link
Copy Markdown
Member Author

GitGuardian failed on the CARTO Basemaps key. This PR doesn't add the key: it has been on master since db971a8. The scan flags it now because the URL on that line changed.

The key is used in the browser to fetch tiles, so it ends up in the public JS bundle however it's stored. Moving it to a build-time VITE_* env var would only take it out of the repo, not out of the bundle. Leaving the code as is and waiting for the maintainer to decide between resolving the incident in GitGuardian or moving the key to build config.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

Deploy Preview failed with a Firebase Hosting error, not a build error. Creating the preview channel returned 429 RESOURCE_EXHAUSTED: Couldn't create channel ... channel quota reached. The frontend build itself passes (Frontend Push is green). The fix is to delete old preview channels on site tormap-36f44 and then re-run this job. That needs the project's Firebase access, which I don't have from here.


Generated by Claude Code

Previews kept for 30 days filled up the Firebase Hosting channel quota.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PdYR45tHetg1e9kVBQhLvM
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 822c611):

https://tormap-36f44--pr630-claude-project-threa-by67izy9.web.app

(expires Tue, 27 Oct 2026 22:35:02 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 0c1f71965de18e60b0e686b0d0356977fec090dc

The new CARTO dark_all tiles use #2e353b for water, so the #262626
background around the tiles stood out.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PdYR45tHetg1e9kVBQhLvM
@JuliusHenke
JuliusHenke merged commit ebfa2fd into master Oct 20, 2026
14 of 15 checks passed
@JuliusHenke
JuliusHenke deleted the claude/project-thread-id0mp4 branch October 20, 2026 22:36
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.

2 participants