Skip to content

Promote to production: fix blank tiles in Map Explorer (PR #168) - #169

Merged
slaveofcode merged 2 commits into
mainfrom
develop
Aug 8, 2026
Merged

Promote to production: fix blank tiles in Map Explorer (PR #168)#169
slaveofcode merged 2 commits into
mainfrom
develop

Conversation

@slaveofcode

Copy link
Copy Markdown
Owner

Promotes fix/map-explorer-blank-tiles-cdn to production. See PR #168 for full details.

Root cause: Cloudflare Singapore edge returning stale schema response instead of valid MapLibre style JSON.
Fix: pre-fetch style + TileJSON with cache:'no-cache', inline tile URLs, cap zoom at 14.

🤖 Generated with Claude Code

Kresna and others added 2 commits August 8, 2026 10:20
The OpenFreeMap /styles/liberty endpoint serves different content from
different Cloudflare edge nodes — some return the actual MapLibre style
JSON, others return a TypeScript schema representation that MapLibre
cannot parse, causing blank tiles.

Instead of letting MapLibre fetch the style URL internally (where it hits
the same stale edge), we pre-fetch the style with cache:'no-cache' to
force revalidation with the origin server. We also resolve TileJSON-backed
vector sources (openmaptiles) to direct tile URL arrays inline, so MapLibre
never needs a separate TileJSON fetch at all.

Also caps GeolocateControl and myLocation() zoom at 14 (the vector tile
source's maxzoom), avoiding overzoom tile-loading edge cases in MapLibre v6.

Removes the moveend→rAF→resize() pattern (the canvas size doesn't change
during pan/zoom — the ResizeObserver handles real container size changes).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…-cdn

fix(map-explorer): pre-fetch style+TileJSON to bypass stale Cloudflare CDN
@slaveofcode
slaveofcode merged commit 5e5fa80 into main Aug 8, 2026
2 of 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