Repository navigation
[9.4-release] fix(geo-layers): clip MVTLayer sub layers to the tile under GlobeView (#10727) - #11060
Merged
Merged
Conversation
…#10727) Backport of #10727 for 9.4, from its September version (ff212cb). The version merged to master builds on the tile-local sub layer data from #10874, which isn't in 9.4. Under GlobeView, sub layers use WGS84 data and skipped ClipExtension, so a feature in the buffers of several tiles was drawn by each of them. WGS84 sub layers are now clipped to the tile's lng/lat bbox, and tile-local sub layers keep their unit-square clip. Also includes the follow-up from master: don't warn about ClipExtension's default clipBounds.
29 of 30 tasks
[Medium impact] The PR appears safe to merge, with one previously reported documentation correction remaining. Findings
SummaryThis backport clips
Reviews (2) · Last reviewed commit: "fix(geo-layers): clip MVTLayer sub layer..." · Reviewed by Greptile |
|
|
||
| ## Remarks | ||
|
|
||
| - `clipBounds` has no effect. Sub layers are always clipped to their own tile. Use [`extent`](./tile-layer.md#extent) to limit the area that is rendered. |
There was a problem hiding this comment.
extent only selects tiles. If the rectangle cuts through a tile, that tile still draws features outside it. Recommending it as a replacement for clipBounds can mislead users who need an exact boundary. Say that extent limits which tiles load and render, not the exact area drawn.
Suggested change
| - `clipBounds` has no effect. Sub layers are always clipped to their own tile. Use [`extent`](./tile-layer.md#extent) to limit the area that is rendered. | |
| - `clipBounds` has no effect. Sub layers are always clipped to their own tile. Use [`extent`](./tile-layer.md#extent) to limit which tiles load and render; features in those tiles are not clipped to the exact extent. |
This was referenced Nov 24, 2026
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.
Follow up of #10727, for #10972. Fixes #10716 on 9.4.
Background
Under
GlobeView,MVTLayersub layers use WGS84 data and skipClipExtension. A feature written into the buffers of several tiles is then drawn once per tile, so translucent fills show dark seams along tile edges.The version of #10727 merged to
masterbuilds on #10874's tile-local sub layer data, which isn't in 9.4, so it can't be cherry-picked. This backports the September version of #10727 (ff212cb815), which clips WGS84 sub layers to the tile's lng/latbbox. Original fix by @cholmes.Change List
bboxthroughClipExtension. Tile-local sub layers keep the[0, 0, 1, 1]clip. Under GlobeView, the lng/lat bounds go through the geometry-mode projection from fix(extensions): ClipExtension geometry mode in GlobeView #10659, which is on9.4-releasethrough [9.4-release] fix(extensions): ClipExtension geometry mode in GlobeView (#10659) #11013.clipBoundsare overridden, with a warning, and an existingClipExtensionis reused rather than added twice.master: no warning forClipExtension's defaultclipBounds(both bots flagged this on fix(geo-layers): clip MVTLayer sub layers to the tile under GlobeView #10727).mvt-layer.md: a Remarks bullet sayingclipBoundshas no effect.Translucent MVT fill on GlobeView with the test fixture tiles, before and after:
Verified locally on 9.4:
mvt-layer.spec.tspasses (17 tests; the two new no-warning tests fail without the fix). The geo-layers, extensions and carto suites pass (261 tests, 4 skipped), as do the MVT render tests. Type check (tsc -bfor geo-layers) andyarn lintpass.