Comments (3)
Sounds great. Itβs a sprawling method that should be refactored on the Swift side too.
from mapbox-navigation-android.
I've been looking over best solutions for splitting up the monitorStepProgress, here are the steps I'm thinking of taking to refactor it.
- Move logic into it's own class and get rid of
LocationUpdateThread
(see #19). - Have routeProgress handle more logic, currently in
monitorStepProgress()
we are doing conversions and calculations that seem fit for handling inside the routeProgress model instead such as calculating the users locationtruePosition
,secondsToEndOfStep
, etc. This would require building a new routeProgress object before determining what alert level the users on and invoking the callbacks appropriately. - Each alert level check moved into separate methods. This can help remove unnecessary checks such as whether the user just departed or not, which only needs to be called once. This also makes testing of each method significantly easier.
from mapbox-navigation-android.
Refactoring of this took place in #30. Closing.
from mapbox-navigation-android.
Related Issues (20)
- PR #7784 merged without review (mapbox-navigation-android)
- Is there a plan to support the flutter version of the Mapbox Navigation SDK? HOT 2
- PR #7793 merged without review (mapbox-navigation-android)
- [Feature Request] Allow to stop ActiveGuidance on DropIn
- mapboxreplay jumping to specific location in virtual driving
- PR #7801 merged without review (mapbox-navigation-android)
- MapUserStyleObserver does not handle local JSON styles
- how to implement user location permission in navigation
- Manually advancing the leg progress does not advance it
- instructionIndex is null message
- PR #7828 merged without review (mapbox-navigation-android)
- Android auto doesnt display maneuver and other related info (Mapbox v2)
- Mapbox Navigation SDK v3, libraries conflict with v11.4.0
- Mapbox Navigation SDK v3, calling mapboxNavigation.startTripSession() crashes the app HOT 1
- Get instruction image from onNewBannerInstructions listener
- PR #7846 merged without review (mapbox-navigation-android)
- KDocs Issues in MapboxRouteArrowApi
- [Bug]: User is traveling inside a tunnel, the road name is incorrect update
- MapBox Start Crashing on updating Scandit Library.
- MapMatchingAPI.requestMapMatching() with POST
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mapbox-navigation-android.