Summary
The current public Navigation SDK v3 API appears to require applications to obtain NavigationRoutes by calling MapboxRoutingProvider.calculateRoutes().
For applications using a server-authoritative routing architecture, this requires a second Directions calculation on the device.
We need a supported public API that allows an application to start navigation from an already existing Mapbox Directions API response generated by a backend.
Backend
│
▼
Mapbox Directions API
│
▼
Backend evaluates alternatives
│
▼
Backend selects one exact route
At this point we would like to pass the complete Directions response to the iOS Navigation SDK.
Desired workflow
Backend
│
▼
Mapbox Directions API
│
▼
Backend selects one route
│
▼
Complete Directions response sent to iOS
│
▼
Navigation SDK constructs NavigationRoutes
│
▼
startActiveGuidance(...)
without performing another Directions request.
Current limitation
We found:
NavigationRoutes(
routeResponse: RouteResponse,
routeIndex: Int,
responseOrigin: RouterOrigin
)
but it appears to be available only through:
@_spi(MapboxInternal)
which is not appropriate for production applications.
The documented public API appears to require:
MapboxRoutingProvider.calculateRoutes(...)
which performs another Directions request and may produce a different route set.
Why this matters
Many enterprise navigation applications perform routing on a backend for reasons such as:
- route optimization
- policy enforcement
- predictive routing
- fleet coordination
- logistics
- server-side decision making
The mobile application should be able to guide the user along the exact backend-selected route rather than initiating another route calculation.
Feature request
Please consider exposing a supported public API that allows developers to:
- construct NavigationRoutes from an existing Mapbox Directions API response,
- specify the selected route index,
- start or replace active guidance,
- avoid another Directions request.
If this capability already exists through a supported public API, could you please point us to the relevant documentation?
Environment
- Navigation SDK for iOS 3.23.1
- Maps SDK 11.23.1
Summary
The current public Navigation SDK v3 API appears to require applications to obtain NavigationRoutes by calling MapboxRoutingProvider.calculateRoutes().
For applications using a server-authoritative routing architecture, this requires a second Directions calculation on the device.
We need a supported public API that allows an application to start navigation from an already existing Mapbox Directions API response generated by a backend.
Backend
│
▼
Mapbox Directions API
│
▼
Backend evaluates alternatives
│
▼
Backend selects one exact route
At this point we would like to pass the complete Directions response to the iOS Navigation SDK.
Desired workflow
Backend
│
▼
Mapbox Directions API
│
▼
Backend selects one route
│
▼
Complete Directions response sent to iOS
│
▼
Navigation SDK constructs NavigationRoutes
│
▼
startActiveGuidance(...)
without performing another Directions request.
Current limitation
We found:
NavigationRoutes(
routeResponse: RouteResponse,
routeIndex: Int,
responseOrigin: RouterOrigin
)
but it appears to be available only through:
@_spi(MapboxInternal)
which is not appropriate for production applications.
The documented public API appears to require:
MapboxRoutingProvider.calculateRoutes(...)
which performs another Directions request and may produce a different route set.
Why this matters
Many enterprise navigation applications perform routing on a backend for reasons such as:
The mobile application should be able to guide the user along the exact backend-selected route rather than initiating another route calculation.
Feature request
Please consider exposing a supported public API that allows developers to:
If this capability already exists through a supported public API, could you please point us to the relevant documentation?
Environment