mapbox / mapbox/mapbox-directions-swift
Add identifier to MapMatchingResponse
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 206
- Forks
- 99
- Avg merge
- 7h 54m
- Merged PRs (30d)
- 3
Description
Per mapbox/mapbox-java#1174, the Mapbox Map Matching API will start returning a `uuid` field for all successful map matching requests. MapMatchingResponse should have an `identifier` property similar to the existing `RouteResponse.identifier` property, decoding it when `uuid` is present in the response.
https://github.com/mapbox/mapbox-directions-swift/blob/b7c26f516cdc46637e5a2eb5b775694516f8b7b3/Sources/MapboxDirections/RouteResponse.swift#L11 https://github.com/mapbox/mapbox-directions-swift/blob/b7c26f516cdc46637e5a2eb5b775694516f8b7b3/Sources/MapboxDirections/RouteResponse.swift#L33
`RouteResponse(matching:options:credentials:)` should pass in the value of this new property instead of `nil`:
https://github.com/mapbox/mapbox-directions-swift/blob/b7c26f516cdc46637e5a2eb5b775694516f8b7b3/Sources/MapboxDirections/RouteResponse.swift#L71
Unlike mapbox/mapbox-java#1174, this work is not blocked by deploying the change to all profiles, because the `identifier` property would be optional.
/cc @mapbox/navigation-ios @danpaz
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 with Sources/MapboxDirections/RouteResponse.swift and its existing identifier property and initializer. Trace how MapMatchingResponse is decoded and how RouteResponse(matching:options:credentials:) is constructed. Done means an optional identifier is decoded from the response's uuid field and passed into the matching RouteResponse.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- api
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100