mapbox / mapbox/mapbox-gl-draw

Option to increase geojson maxzoom?

Open
#1,143 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged feature
Dominant language
JavaScript
Stars
1.1k
Forks
612
Avg merge
8d 9h
Merged PRs (30d)
5

Description

I'm building a tool to draw features with millimeter precision. Unfortunately the default maxzoom of geoJson sources is 18, which equates to a rendering precision of about 10mm.

I believe the offending line is here:
https://github.com/mapbox/mapbox-gl-draw/blob/c12fb64b90d00e877e94b12b60bc3b80e42924dd/src/setup.js#L85-L100

Im pretty sure this could be fixed by setting maxzoom of geojson data source to >=24, or even making it an init option.

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 reading src/setup.js around lines 85-100, where the GeoJSON source settings are identified. Determine whether a higher fixed maxzoom or an initialization option best fits the request, and verify that the resulting source supports the requested precision.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.