transform.coveringTiles support `renderWorldCopies` option
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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