mapbox / mapbox/mapbox-gl-js

Support higher zoom levels (increase 25.5 max zoom to 28.0)

Open
#13,557 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

## Motivation

We want to show high precision GPS measurements as points. Normally, zoom level of 25.5 is enough for even the most precise measurements, however we want to be able to zoom in more to clearly see error distribution. Say we measure the same point 100 times. In a perfect world that would be 100 duplicates of the same point but GPS measurements have some error. At zoom level of 25.5, errors are visible but points are rather too close to each other to clearly see the error distribution.

OpenLayers and ArcGIS runtime SDK both support higher zoom levels.

## Implementation

Not sure. Probably just increase a constant number defined somewhere in the code.

I believe the reason for using 25.5 as the maximum allowed zoom was to fit it into 1 byte (255 each 0.1). This was a long time ago, [see](https://github.com/mapbox/mapbox-gl-js/issues/251). Is it still necessary to fit zoom into 1 byte? As far as I could tell, zoom is not being put into every vertex anymore.

Supporting zoom levels higher than 28.0 might not be straightforward due to floating point precision, but 28.0 shouldn't be much of a challenge as long as the 1-byte requirement isn't a thing anymore.

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 locating the constant or validation that limits the maximum zoom to 25.5, then inspect whether zoom is still encoded in one byte or stored in vertex data. Done means zoom level 28.0 is accepted and high-precision points can be viewed at that level without breaking existing map behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.