You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#343 added an overridable DirectionsOptions.urlQueryItems property for the purpose of enabling applications to take advantage of not-yet-ready-for-primetime Directions API parameters. Unfortunately, 593efd3 for #382 made the property internal. It was probably an oversight, and I think we can safely reexpose the property. MatchOptions is unaffected; its urlQueryItems property remains open.
Until we reexpose DirectionsOptions.urlQueryItems publicly, the workaround would be to take the result of Directions.url(forCalculating:) or similar, use URLComponents to parse the URL and add more urlQueryItems, get the URL back out, request that URL using URLSession, and use JSONDecoder to decode the response as a RouteResponse – basically, everything that Directions.calculate(_:completionHandler:) normally does for you.
/cc @mapbox/navigation-ios
The text was updated successfully, but these errors were encountered:
Some of the unit tests supposedly exercise this functionality from an application point of view, but they have access to the property anyways because MapboxDirections is imported as @testable, giving the test bundle access to even fileprivate and internal symbols.
#343 added an overridable
DirectionsOptions.urlQueryItems
property for the purpose of enabling applications to take advantage of not-yet-ready-for-primetime Directions API parameters. Unfortunately, 593efd3 for #382 made the property internal. It was probably an oversight, and I think we can safely reexpose the property. MatchOptions is unaffected; itsurlQueryItems
property remainsopen
.Until we reexpose
DirectionsOptions.urlQueryItems
publicly, the workaround would be to take the result ofDirections.url(forCalculating:)
or similar, useURLComponents
to parse the URL and add moreurlQueryItems
, get the URL back out, request that URL usingURLSession
, and useJSONDecoder
to decode the response as aRouteResponse
– basically, everything thatDirections.calculate(_:completionHandler:)
normally does for you./cc @mapbox/navigation-ios
The text was updated successfully, but these errors were encountered: