mapbox / mapbox/mapbox-sdk-js

getDirections: waypoint.separatesLegs

Open
#343 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
768
Forks
191
PR merge metrics
No merged PRs in 30d

Description

Hello, the iOS version of getDirections api has waypoint.separatesLegs:
https://docs.mapbox.com/ios/api/directions/0.30.0/Classes/Waypoint.html#/Waypoint

How to achieve the same in javascript? Looking at https://github.com/mapbox/mapbox-sdk-js/blob/master/services/directions.js#L65 , it it not there.

I need separateLegs in javascript because I generate `route` object in javascript and then use it for `[[MBRoute alloc] initWithJSON:self->_route waypoints:mbWaypoints routeOptions:routeOptions];` in iOS

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 in services/directions.js at the waypoint handling referenced by the issue, then compare its behavior with the iOS Waypoint documentation. Determine how separatesLegs should be represented in the JavaScript directions output; done means the generated route can be passed to MBRoute with separate legs preserved.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.