[geo-layers] Fix GlobeView Mercator tile warping#10350
Open
charlieforward9 wants to merge 5 commits into
Open
Conversation
chrisgervang
reviewed
Jun 6, 2026
chrisgervang
left a comment
Collaborator
There was a problem hiding this comment.
The fix looks good. Let's consider how to make this generalized for other layers that may need the same correction
| private _getGlobeBitmapLayerProps(layer: Layer): Record<string, unknown> | null { | ||
| if ( | ||
| !(this.context.viewport instanceof _GlobeViewport) || | ||
| !(layer instanceof BitmapLayer) || |
Collaborator
There was a problem hiding this comment.
What do BitmapLayers and other layers that need this reprojection have in common?
Have you considered the qualities a layer needs be susceptible to warping?
| bounds: overlappedBounds, | ||
| elevationDecoder, | ||
| meshMaxError, | ||
| remapToWebMercatorTile: isGlobe, |
Collaborator
There was a problem hiding this comment.
All tile sublayers rendered on a globe trigger the remap. Is it true that only the built-in bitmap layer gets modified by this, or would other sublayers get remapped too?
53 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes
GlobeViewrendering for WebMercator terrain and imagery tiles. Terrain mesh rows and bitmap UVs now respect WebMercator row spacing instead of treating tile latitude as linear from top to bottom.Why
XYZ/slippy tiles are encoded in WebMercator space. In
GlobeView, deck.gl positions tile geometry in lng/lat space, so using linear latitude rows compresses terrain and imagery toward high latitudes. The distortion is easiest to see at far zooms and pitched globe views.What Changed
TerrainLayer: remaps tiledGlobeViewmesh row latitude through@math.gl/web-mercatorduring the private terrain load path.TerrainLayer: keeps the remap scoped to tiledGlobeViewand copies the position array so loader/cached mesh data is not mutated.TileLayer: defaults generatedBitmapLayertile imagery to WebMercator image coordinates inGlobeViewwhile preserving explicit_imageCoordinateSystemoverrides.GlobeViewbitmap coordinates, and explicit bitmap coordinate preservation.Validation
yarn vitest run --project headless test/modules/geo-layers/terrain-layer.spec.tsyarn vitest run --project headless test/modules/geo-layers/tile-layer/tile-layer.spec.tsVisual Validation
projection-warping.mov