Add Turn-by-Turn routing to a map

The result of a routing request is a special format that needs some processing to show in a JavaScript-based web map application.

For Leaflet, the Leaflet Routing Machine via the lrm-valhalla plugin (as shown in this outdated, but good tutorial) helps. Please note that mapzen urls are no longer available, so one must set the serviceUrl within the options of the L.Routing.mapzen router to point to a valid Valhalla route service!

You can review the documentation to learn more about routing with Turn-by-Turn.