Skip to content

Add showAlternatives prop to display alternative routes on the map #232

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cjsmith
Copy link

@cjsmith cjsmith commented May 22, 2025

Fixes #198. I added a showAlternatives prop which when enabled sets the alternatives parameter to true and then renders the alternative routes returned in the result using the alternativeStroke* properties. The onReady prop gets invoked with the main route and then it will get invoked again when an alternative route is selected. Also added selectedRouteIndex and onRouteSelected props to allow parent components to persist the last selected route.

@cjsmith cjsmith changed the title Add showAlternatives prop to display alternative routes on the map #198 Add showAlternatives prop to display alternative routes on the map May 22, 2025
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

Successfully merging this pull request may close these issues.

Alternative routes with on press event
1 participant