mapbox / mapbox/mapbox-navigation-android

Add overview mode for MapboxViewportDataSource

Open
#5,355 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature jira-sync-complete UI
Dominant language
Kotlin
Stars
651
Forks
321
PR merge metrics
No merged PRs in 30d

Description

`MapboxViewportDataSource`'s overview state only frames the current leg of the route, which means that in case of multi-leg route, a portion of the route (everything besides the current leg) will not be framed.

There's a request to provide an option to frame the full route at all times.

My initial idea is to introduce an enum, sealed class or a similar interface that allows to select the overview mode:
```
sealed class OverviewMode {
object CurrentLeg: OverviewMode
object Full: OverviewMode
}
```

and accept it in `MapboxViewportDataSourceOptions#overviewFrameOptions`. Depending on the mode, we'll either frame the full route or the current leg.

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 at MapboxViewportDataSource and MapboxViewportDataSourceOptions#overviewFrameOptions; inspect how the overview state selects the current leg for framing. Confirm the API shape and route geometry used for full-route framing, then add coverage for both modes and verify that Full frames the complete multi-leg route.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
mobile-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.