improve lod tile loading for projections
@mourner is already working on this.
Since Nov 5, 2021.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/mapbox/mapbox-gl-js/pull/11225 improved level-of-detail tile loading for projections but there is still one major issue. It uses the center of the mercator tile to calculate the tile's scale. This is problematic when the center of the mercator tile is very far from the center of the tile in a different projection.
For example, with `{ name: 'albers', parallels: [90, 90] }` the z1 tile does not split early enough because the point at which it calculates the scale is still at an ok size.
This should be split:

After it splits, you can see how far north the center is:

Possible fixes might be:
- use center of the tile in LngLat instead of mercator
- use some other measure of center
- use some non-center area based measurement
I'm not sure, but this might be a performance sensitive spot.
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.
Assessment
This issue has not been assessed yet.