Skip to content

Commit

Permalink
Added the waypoint_names field to directions options params. Updated …
Browse files Browse the repository at this point in the history
…the instruction test suite and json file to reflect these new changes.
  • Loading branch information
vincethecoder authored and Bobby Sudekum committed May 9, 2018
1 parent c9ea062 commit 5a39502
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 20 deletions.
5 changes: 5 additions & 0 deletions MapboxDirections/MBDirectionsOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,11 @@ open class DirectionsOptions: NSObject, NSSecureCoding, NSCopying {
params.append(URLQueryItem(name: "annotations", value: attributesStrings))
}

if !waypoints.compactMap({ $0.name }).isEmpty {
let names = waypoints.map { $0.name ?? "" }.joined(separator: ";")
params.append(URLQueryItem(name: "waypoint_names", value: names))
}

return params
}
}
Expand Down
Loading

0 comments on commit 5a39502

Please sign in to comment.