mapbox-directions-swift
mapbox-directions-swift copied to clipboard
Convert from GPX to RouteOptions and MatchOptions
The GPX file format is used by Xcode for various things like route simulation and declaring compatible regions. It’s quite handy to stick a GPX trace in Wormhole and enable route simulation to test on-device behavior. For improved compatibility, RouteOptions and MatchOptions could have an initializer that takes GPX data (or perhaps a GPX file URL) as an argument instead of an array of coordinates.
We could focus on the subset of GPX supported by Xcode to start out with. MatchOptions should also consider timestamps, but that requires adding a way to specify timestamps when map matching: #294.
/cc @mapbox/navigation-ios @coxchapman @danpat