mapbox / mapbox/mapbox-directions-swift
Add per-waypoint timestamp option for map matching
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 206
- Forks
- 99
- Avg merge
- 7h 54m
- Merged PRs (30d)
- 3
Description
The Map Maching API has an optional [`timestamps`](https://www.mapbox.com/api-documentation/#retrieve-a-match) query parameter. Currently, this library doesn’t offer a way to specify that parameter. Waypoint should have a `timestamp` property (of type Date). `MatchOptions.getter:params` should aggregate the `timestamp`s of the waypoints into the `timestamps` parameter.
In https://github.com/mapbox/MapboxDirections.swift/pull/236#discussion_r172037100, I had suggested relying on `CLLocation.timestamp`, but it turns out that Waypoint stores coordinates and headings separately, not as part of a location. That should change, though not necessarily as part of fixing this omission.
It isn’t clear to me what should happen when one waypoint has a timestamp and another does not. Maybe this semicolon-delimited list can contain blank entries.
/ref https://github.com/mapbox/mapbox-navigation-android/issues/875#issuecomment-421332368
/cc @frederoni
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the Waypoint type and MatchOptions.getter:params, then trace how map-matching query parameters are assembled. Add the timestamp option and define how missing waypoint timestamps are represented; done means the resulting timestamps parameter is correctly generated and covered by the relevant request tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100