[geo-layers] Fix GlobeView Mercator tile warping#10350
Open
charlieforward9 wants to merge 4 commits into
Open
Conversation
chrisgervang
reviewed
Jun 6, 2026
Collaborator
chrisgervang
left a comment
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
| meshMaxError, | ||
| signal | ||
| }); | ||
| const isGlobe = Boolean(viewport.resolution && viewport.resolution > 0); |
Collaborator
There was a problem hiding this comment.
Is this the best way to detect globe?
| }); | ||
| } | ||
|
|
||
| private _getGlobeBitmapLayerProps(layer: Layer): Record<string, unknown> | null { |
Collaborator
There was a problem hiding this comment.
Is this the best way to detect this? It works for bitmap layer but not for any custom layers extending bitmap layer.
How would custom layers take advantage?
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