mapbox / mapbox/mapbox-navigation-android
Navigation UI contineous shows “Rerouting...”
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 651
- Forks
- 321
- PR merge metrics
- No merged PRs in 30d
Description
Hi Support Team,
**Android API:** No api used, Used navigation sdk. implementation "com.mapbox.navigation:ui:1.0.0"
**Mapbox Navigation SDK version:** 1.0.0
We are using mapbox navigation sdk to show route on map, And I faced issue like it continuous shows "**Rerouting...**", can you inform us in which case this issue happen? Find attached video for reference.
Below are sample code which used.
Initialize
```
val mapboxNavigationOptions = MapboxNavigation
.defaultNavigationOptionsBuilder(requireContext(), getString(R.string.access_token))
.build()
mapboxNavigation = MapboxNavigation(mapboxNavigationOptions)
```
Generate route on map
```
mapboxNavigation?.requestRoutes(
RouteOptions.builder()
.applyDefaultParams()
.accessToken(Mapbox.getAccessToken()!!)
.coordinates(listOf(origin, destination))
.alternatives(true)
.language(Locale.getDefault().toString())
.geometries(RouteUrl.GEOMETRY_POLYLINE6)
.profile(RouteUrl.PROFILE_DRIVING)
.build(),
routesReqCallback
)
```
Start Navigation
```
val options = NavigationViewOptions.builder(requireContext())
.directionsRoute(directionsRoute)
.shouldSimulateRoute(true)
.navigationListener(this)
.routeProgressObserver(routeProgressObserver)
.locationObserver(object : LocationObserver {
override fun onEnhancedLocationChanged(
enhancedLocation: Location,
keyPoints: List
) {
}
override fun onRawLocationChanged(rawLocation: Location) {
//val latitude = rawLocation.latitude
//val longitude = rawLocation.longitude
//Log.e("Latitude ==>>",""+latitude)
// Log.e("Longitude ==>>",""+longitude)
//(activity as HomeActivity).sendCurrentLocation(latitude,longitude)
}
})
.build()
try {
navigationInfoView?.startNavigation(options)
val map = navigationInfoView?.retrieveNavigationMapboxMap()
map?.resetPadding()
map
?.resetCameraPositionWith(NavigationCamera.NAVIGATION_TRACKING_MODE_GPS)
} catch (e: Exception) {
Log.e("Exception", e.message.toString())
}
```
https://user-images.githubusercontent.com/64770544/131811863-a68f453c-8960-4c22-9601-eb278fd61b9f.mp4
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 the Kotlin initialization, route request, and NavigationViewOptions examples in the issue, using Mapbox Navigation SDK 1.0.0. Reproduce the continuous “Rerouting...” behavior with the supplied route and simulation settings, then determine the conditions involved and document a confirmed cause or actionable fix; the issue includes no named source file or test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100