Mapbox-navigation-android: Mapbox mapmatching waypoint issue

Created on 2 Aug 2018  路  5Comments  路  Source: mapbox/mapbox-navigation-android

Android API:27
Mapbox Navigation SDK version:com.mapbox.mapboxsdk:mapbox-android-navigation:0.16.0

Hello everyone,

I have a problem with banner instructions. In our app, we would like to start turn by turn navigation with a specific route that we provide from another service. So we use our route as input for mapbox mapmatching. We get response from mapmatching and pass it as directionRoute to navigationView.

Everything is great so far, I'm able to get mapmatched route and navigationView starts without problem.

Problem is banner instructions. Mapmatching API returns the route as waypoints. Navigation banner treat each waypoint as destination. So I'm getting "You have arrived" text continuously. In addition to this map is rotation when we arrive at a waypoint.
When I click on instruction banner It doesnt show the next steps.

It would be great if you can solve this issue.

Snapshots:
screenshot_20180802-170535_easy route

When I click instruction banner:

screenshot_20180802-170524_easy route

screen record:
ezgif-1-269eb3c384

Most helpful comment

Hey @headbanggg 馃憢 Yeah it looks like the map matching response is returning a route completely made of waypoints, so the data / SDK is constantly providing arrival statuses.

Like @vincent-caron pointed out (thanks!), I'd work with the map matching request / adjust your parameters. Regarding map matching used with the NavigationView, please check out https://www.mapbox.com/android-docs/navigation/overview/map-matching/ as we have some guidelines on how to successfully reroute.

All 5 comments

Hi,

in your builder just add this line :
MapboxMapMatching.builder()
.accessToken(Mapbox.getAccessToken())
.coordinates(liste)
### .waypoints(0, liste.size()-1 )
.steps(true)
.bannerInstructions(true)
.roundaboutExits(true)
.voiceInstructions(true)
.voiceUnits("metric")
.language("fr-FR")
.profile(DirectionsCriteria.PROFILE_WALKING)
.build()

The liste variable contains the waypoints

That way, only the first and the last points will be the waypoints, the others will be there to track the route.

But beware,if you leave the route it will reroute you to the last point directly

hope this help

Hey @headbanggg 馃憢 Yeah it looks like the map matching response is returning a route completely made of waypoints, so the data / SDK is constantly providing arrival statuses.

Like @vincent-caron pointed out (thanks!), I'd work with the map matching request / adjust your parameters. Regarding map matching used with the NavigationView, please check out https://www.mapbox.com/android-docs/navigation/overview/map-matching/ as we have some guidelines on how to successfully reroute.

@vincent-caron @danesfeder

.waypoints(0, liste.size()-1 )

Thanks a lot for your help. It works like a charm 馃憤

you're welcome

Thanks. It works.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

skienzl picture skienzl  路  5Comments

ericrwolfe picture ericrwolfe  路  9Comments

karussell picture karussell  路  4Comments

vidhi1011 picture vidhi1011  路  10Comments

Danny-James picture Danny-James  路  7Comments