mapbox / mapbox/mapbox-gl-js

Tile cover should always produce tile zooms based on distance to camera

Open
#10,279 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3d :triangular_ruler:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

_proposed and reported by @astojilj_

Transform#coveringTiles(): this two positions should produce similar tile cover. Now, the maxZoom of tile cover returned is transform.tileZoom.
If mountain peak (attached video) is in center of screen, calculated zoom is 15 and tile cover produces tiles of zoom levels up to 15. If center of screen lays on a point that is in the walley then transform.tileZoom is calculated as 13 and tile cover produces tile set with zoom levels up to 13.

The distance to camera is almost the same. coveringZoomLevel() limits zoom until the tile cover algorithm is run - running it further should make the tiles close to camera in proper zoom level.

![tilecover-dependencyonzoom (1)](https://user-images.githubusercontent.com/549216/68205624-75bcca80-ffd3-11e9-8837-3b94d8dc50ea.gif)

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 by tracing Transform#coveringTiles() and its coveringZoomLevel() limit. Compare the mountain-peak and valley-centered views described in the issue; done when similar camera distances produce similar tile coverage, with tiles near the camera reaching the appropriate zoom instead of being capped by transform.tileZoom.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.