Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: NavigationMapRoute Line #1293

Closed
Danny-James opened this issue Sep 14, 2018 · 8 comments
Closed

Question: NavigationMapRoute Line #1293

Danny-James opened this issue Sep 14, 2018 · 8 comments

Comments

@Danny-James
Copy link

I'm sorry if this has already been answered, however, I'm looking at a solution to hide the Navigation Route Line, whether this is by physically hiding it or if possible to set the opacity to ZERO.

The reason i would like to do this is i'm using the MapMatching and the Line is visually cutting corners, With the coordinates i'm passing in I've been able to plot an accurate poly line on the NavigationView but this means i now have two lines.

If possible i would like to hide the NavigationMapRoute Line but if possible to keep turn arrows visible.

Is their anything available for me to do this currently and if so could someone provide me with a code example.

Many Thanks.

@Danny-James
Copy link
Author

#1177 I've managed to find my initial question which was closed but i never got an answer on how to implement hiding the Route Line and keeping turn arrows.

@Danny-James
Copy link
Author

@danesfeder is their any chance of having a look into this or if possible point me in the right direction of hiding the NavigationLine?

What I would really like to do as explained is;

  • Hide Navigation Line
  • Keep Navigation Turn Arrows

@Danny-James
Copy link
Author

I've tried the following navigationView.retrieveNavigationMapboxMap().removeRoute(); but this doesn't seem to do anything.

private void startNavigation(DirectionsRoute directionsRoute) {
        Log.d(TAG, "StartNavigation");
        NavigationViewOptions navigationViewOptions = setupOptions(directionsRoute);
        navigationView.startNavigation(navigationViewOptions);
        navigationView.findViewById(R.id.feedbackFab).setVisibility(View.GONE);
        //navigationMapboxMap.removeRoute();

        // Create Origin and Destination Markers
        createMarkers();

        // Hide Navigation Line;
        navigationView.retrieveNavigationMapboxMap().removeRoute();
    }

@Danny-James
Copy link
Author

My users are getting confused with the MapMatching Returned Line So I'd Like To Hide/Remove It.

See Below;
screenshot_20181015-152805_route_info 1

@danesfeder
Copy link
Contributor

@Danny-James dug into this and cut a PR to fix #1482

@Danny-James
Copy link
Author

@danesfeder will this allow me to hide the line but keep the turn arrows?

@danesfeder
Copy link
Contributor

@Danny-James no, but the turn lanes will be incorrectly positioned as well? We are thinking about adding turn arrow APIs in #1387 which is a larger refactor

@Danny-James
Copy link
Author

@danesfeder surprisingly the turn arrows are actually correct when the Navigation Line cuts across roads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants