Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

precision parsing bug, i think?

Open
#76 0 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
javascript
Domain
data

Research direction

Reproduce the issue through polyline.toGeoJSON using precision 4, then compare its coordinate output with omitted precision and precision 5. Trace the precision handling and define done as precision 4 producing correctly scaled latitude and longitude pairs, with a regression check for the reported example.

Written by the indexing model from the issue text.

Description

using polyline.toGeoJSON, if i pass precision of 5 or omit precision the parsing works fine. but if i try to use precision of 4 it is messing up decimals places of the lat/lon pairs.

example, default precision or precision 5:
response: [-72.99583, 41.92463]

if i specify precision 4
response: [-729.9583, 419.2463]

Dominant language
JavaScript
Stars
674
Forks
100
PR merge metrics
No merged PRs in 30d

Getting set up

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.

More from mapbox/polyline

All issues in mapbox/polyline

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.