Show directions on a map
Use Mapbox Services to request directions
Match raw GPS points to the map so they align with the roads/pathways.
Simplify a polyline
Using the polylines utility, simplify a polyline which reduces the amount of coordinates making up the polyline depending on tolerance.