mapbox / mapbox/mapbox-gl-directions

encode geometry

Open
#238 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged question
Dominant language
JavaScript
Stars
255
Forks
130
PR merge metrics
No merged PRs in 30d

Description

Hi there, hope this is the right spot for my issue. If not apologize. Using mapbox-gl-direction api, input a route, get an array of coordinates and encode this result with polyline.js [https://github.com/mapbox/polyline](url) Get an encoded string, but the string is different from what I get when i use this mapbox example [https://docs.mapbox.com/help/demos/how-mapbox-works/how-directions-works.html](url).

Tried every polyline option to encode my coordinates, but never got the same result as the example shows in geometry.
Or can anybody let me know how to access the encoded string in geometry in the raw json object?

Thank you, and excuse my German-English.

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 comparing the coordinate array from the mapbox-gl-direction API with the polyline.js output and the geometry shown in the Mapbox directions example. Check the raw JSON geometry to determine whether an encoded string is available; done means the encoding discrepancy or access path is clearly established.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.