I'm working on a project (web application) kind of a trip planner which uses maps to show directions (driving) for the users which they enter destinations of their trip. and I'm using Mapbox web services to do this. What I'm trying to do is get the directions for user input which was entered early stage and plot it on a mapbox map.
I know how to get the directions calling the api directly, but I'm having hard time for show this data on a map, I know there is this directions.js which is a pulgin for mapbox but I dont understand how to implement it.
and is there a better or easy way to achieve this. thanks in advance