Mapbox GL Directions
A full featured directions plugin for Mapbox GL JS using the Mapbox Directions API. Quickly add UI to display driving, cycling, or walking directions on the map. The Mapbox Directions API is powered by the OSRM routing engine and open data from the OpenStreetMap project.
var mapboxgl = ;var MapboxDirections = ;var directions =accessToken: 'YOUR-MAPBOX-ACCESS-TOKEN'unit: 'metric'profile: 'mapbox/cycling';var map =container: 'map'style: 'mapbox://styles/mapbox/streets-v9';map;
See API.md for complete reference.