mapbox / mapbox/mapbox-directions-swift

Add per-waypoint timestamp option for map matching

Open
#294 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug map matching platform parity
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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.