mapbox / mapbox/mapbox-gl-js

transform.coveringTiles support `renderWorldCopies` option

Open
#12,977 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged feature :green_apple:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

I noticed that this method has added relevant types in [coveringTiles](https://github.com/mapbox/mapbox-gl-js/blob/37624d45b7185d5a213b8a5cd094ed95a9eb49d4/src/geo/transform.js#L932), but it has not been implemented logically. It only needs to be modified [L1144](https://github.com/mapbox/mapbox-gl-js/blob/37624d45b7185d5a213b8a5cd094ed95a9eb49d4/src/geo/transform.js#L1144)

```js
const renderWorldCopies = options.renderWorldCopies !== undefined ? options.renderWorldCopies : this.renderWorldCopies;

if (renderWorldCopies) {
// Render copy of the globe thrice on both sides
for (let i = 1; i <= NUM_WORLD_COPIES; i++) {
stack.push(newRootTile(-i));
stack.push(newRootTile(i));
}
}
```

this is very useful for implementing some custom rendering externally. If possible, I can submit a PR

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/geo/transform.js at coveringTiles, especially the referenced area around line 1144, and read how the existing renderWorldCopies state is used. Verify that the method respects the renderWorldCopies option supplied by callers, and confirm that custom rendering receives the expected world copies.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.