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

How to use NavigationRoutes in case of custom router provider? #4747

Open
xdmiodz opened this issue Feb 11, 2025 · 1 comment
Open

How to use NavigationRoutes in case of custom router provider? #4747

xdmiodz opened this issue Feb 11, 2025 · 1 comment

Comments

@xdmiodz
Copy link

xdmiodz commented Feb 11, 2025

Discussed in #4746

Originally posted by xdmiodz February 10, 2025
Hi! I have my own routing provider that mimics the Mapbox API, and it works well with an older version of Mapbox Navigation. Now, I want to migrate to a newer version, but I’ve encountered an issue: NavigationViewController now requires a NavigationRoutes object as an input parameter. However, I can't find a way to convert my existing Route struct—used in my Directions API wrapper—into a NavigationRoutes instance.

I'm really confused about how I’m supposed to use my custom routing provider with the new Mapbox Navigation controller.

@kried
Copy link
Contributor

kried commented Feb 11, 2025

Hi @xdmiodz

The Nav SDK v3 no longer provides a way to construct routes from JSON or custom DirectionsRoute objects. Please see our migration docs.

In case of custom route coordinate, you can construct NavigationRoutes using Map Matching API request.

In case of further questions please contact our support team.

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