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
The Directions API will soon expose a waypoints parameter similar to the Map Matching API’s: Project-OSRM/osrm-backend#5345. To support it, we could move MatchOptions.waypointIndices and its support code to DirectionsOptions, allowing RouteOptions to inherit it:
However, this would be a good opportunity to replace the parallel index set with a more object-oriented property on Waypoint that determines whether the individual waypoint is explicitly persisted in the route response. I’m not sure what to name it: isPersistent? isIncludedInCalculatedRoute? isRepresentedByArrivalAndDepartureSteps? separatesTwoLegs? isIncludedInInstructions? isImpliedByCalculatedRoute? isViaPoint?
Based on this property, we’ll have to revisit the assumption that RouteOptions.waypoints lines up with the response’s waypoints:
@JThramer suggested a WaypointType enumeration with the values .stop and .via. The enumeration values will need to make sense for both RouteOptions and MatchOptions.
The Directions API will soon expose a
waypoints
parameter similar to the Map Matching API’s: Project-OSRM/osrm-backend#5345. To support it, we could moveMatchOptions.waypointIndices
and its support code to DirectionsOptions, allowing RouteOptions to inherit it:https://github.com/mapbox/MapboxDirections.swift/blob/c350b60489c33845551cf0163a5481d32c940479/MapboxDirections/Match/MBMatchOptions.swift#L49-L56
However, this would be a good opportunity to replace the parallel index set with a more object-oriented property on Waypoint that determines whether the individual waypoint is explicitly persisted in the route response. I’m not sure what to name it:
isPersistent
?isIncludedInCalculatedRoute
?isRepresentedByArrivalAndDepartureSteps
?separatesTwoLegs
?isIncludedInInstructions
?isImpliedByCalculatedRoute
?isViaPoint
?Based on this property, we’ll have to revisit the assumption that
RouteOptions.waypoints
lines up with the response’s waypoints:https://github.com/mapbox/MapboxDirections.swift/blob/c350b60489c33845551cf0163a5481d32c940479/MapboxDirections/MBRoute.swift#L27-L29
/cc @mapbox/navigation-ios @danesfeder
The text was updated successfully, but these errors were encountered: