mapbox / mapbox/mapbox-navigation-android

how can i draw a history route on the mapview

Open
#7,325 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
651
Forks
321
PR merge metrics
No merged PRs in 30d

Description

hi,
if i get List from onRoutesReady.
How can i use it to draw a route from json
Because i want to save the history route in json to show it on the mapview in future
thanks!
my version
implementation 'com.mapbox.maps:android:10.13.0'
implementation "com.mapbox.navigation:android:2.14.0"

```
NavigationRouterCallback {
override fun onRoutesReady(
routes: List,
routerOrigin: RouterOrigin
) {
mapView.getMapboxMap().getStyle(){style->

//here i want to become json and draw a json on the map
}
}
}
```

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 the onRoutesReady callback, the NavigationRoute list, and MapView in the issue example. Determine how a route obtained there can be represented for later use and rendered after restoration. Done means the saved history route can be loaded and displayed on the MapView.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.