mapbox / mapbox/mapbox-navigation-android

Make route parsing options dynamic in viewport data source

Open
#4,366 0 comments 0 reactions 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

Some of the options in the viewport data source are "static" in a sense that they only take effect when a route changes (MapboxNavigationViewportDataSource#onRouteChanged). Namely:

  • options.followingFrameOptions.intersectionDensityCalculation.minimumDistanceBetweenIntersections
  • options.followingFrameOptions.frameGeometryAfterManeuver.distanceToCoalesceCompoundManeuvers
  • options.followingFrameOptions.frameGeometryAfterManeuver.distanceToFrameAfterManeuver

Now, the route geometry is parsed once when it's provided and resulting geometries for all steps are cached. We could explore a lazy loading approach where we generate and cache only the route geometries for the upcoming step (as long as the options don't change) to make the above options also respected "dynamically".

cc @MaximAlien

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 with MapboxNavigationViewportDataSource#onRouteChanged and trace how route geometry is parsed and cached for all steps. Evaluate a lazy approach that caches geometry for the upcoming step while options remain unchanged, then verify that the three listed options are respected after they change without a route change.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.