Skip to content

feat(BitmapLayer): add tile loading placeholders#10359

Open
charlieforward9 wants to merge 2 commits into
masterfrom
codex/tile-placeholder-globe-stack-demo
Open

feat(BitmapLayer): add tile loading placeholders#10359
charlieforward9 wants to merge 2 commits into
masterfrom
codex/tile-placeholder-globe-stack-demo

Conversation

@charlieforward9

@charlieforward9 charlieforward9 commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Approaches another degree of feature parity with  / Google Maps.

Screen.Recording.2026-06-09.at.7.17.07.PM.mov
  • add an opt-in TileLayer.renderPlaceholder hook for selected loading tiles with no loaded content
  • keep cached refinement behavior by default, while allowing refinementStrategy: 'no-overlap' to prefer placeholders over cached ancestor/child content
  • forward renderPlaceholder through tiled TerrainLayer
  • document the placeholder API and add delayed-loading placeholder demos to the map-tile and image-tile examples
  • add focused TileLayer and TerrainLayer coverage for placeholder rendering, refinement interaction, loading state, and prop forwarding

Caveat

This PR intentionally leaves one follow-up open: eliminate the intermediate frame between the placeholder and the final bitmap. The current API is scoped to rendering placeholders while tile content is absent; the placeholder-to-BitmapLayer transition can be tightened further in a follow-up.

Validation

  • git diff --check
  • npx prettier --config .prettierrc --check modules/geo-layers/src/tile-layer/tile-layer.ts modules/geo-layers/src/terrain-layer/terrain-layer.ts test/modules/geo-layers/tile-layer/tile-layer.spec.ts test/modules/geo-layers/terrain-layer.spec.ts examples/website/map-tile/app.tsx examples/website/image-tile/app.tsx
  • npx eslint --no-error-on-unmatched-pattern modules/geo-layers/src/tile-layer/tile-layer.ts modules/geo-layers/src/terrain-layer/terrain-layer.ts test/modules/geo-layers/tile-layer/tile-layer.spec.ts test/modules/geo-layers/terrain-layer.spec.ts examples/website/map-tile/app.tsx examples/website/image-tile/app.tsx (0 errors; test files are ignored by the repo lint config)
  • yarn test --project node test/modules/geo-layers/tile-layer/tile-layer.spec.ts test/modules/geo-layers/terrain-layer.spec.ts (2 files, 12 tests)

@charlieforward9 charlieforward9 force-pushed the codex/tile-placeholder-globe-stack-demo branch from 41a8aff to f145fe8 Compare June 9, 2026 23:43
@charlieforward9 charlieforward9 changed the title Add tile loading placeholders feat(BitmapLayer): add tile loading placeholders Jun 9, 2026
@chrisgervang

Copy link
Copy Markdown
Collaborator

Why are the paths not always visible on the globe? Is it a gap of tiles where no tiles are being requested, or are they there but covered by something?

In other words, is the grey we're seeing on the globe the back side or the front side?

Another approach to consider: Could this effect be implemented with an always-present grid layer that's just rendered underneath a tile layer? It's less clever, but also easier to reason about

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