feat(BitmapLayer): add tile loading placeholders - #10359
Conversation
41a8aff to
f145fe8
Compare
|
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 |
I'm with @chrisgervang on this, it seems like an simpler way to achieve the same thing. The fact that there is a "caveat" which that adds a random blank grey frame doesn't smell good to me. I would say try to implement the result you want without modifying |
Summary
Approaches another degree of feature parity with / Google Maps.
Screen.Recording.2026-06-09.at.7.17.07.PM.mov
TileLayer.renderPlaceholderhook for selected loading tiles with no loaded contentrefinementStrategy: 'no-overlap'to prefer placeholders over cached ancestor/child contentrenderPlaceholderthrough tiledTerrainLayerCaveat
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 --checknpx 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.tsxnpx 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)