mapbox / mapbox/mapbox-navigation-android
Make route parsing options dynamic in viewport data source
Nobody has claimed this yet.
- 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.minimumDistanceBetweenIntersectionsoptions.followingFrameOptions.frameGeometryAfterManeuver.distanceToCoalesceCompoundManeuversoptions.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
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 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