I don't have much knowledge of Javascript and I haven't been able to figure out a solution for my problem. I'm making use of the Mapbox Direction API, which currently supports traffic/driving/walking/cycling. I am however interest in an other option; transit, for which I have my own GTSF datasets up and running in a queryable database. Hence; I want to use the code of the Mapbox Direction API and couple it to my own database (in the end, some small steps first..). - Example: https://www.mapbox.com/mapbox-gl-js/example/mapbox-gl-directions/ - Code: https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-directions/v3.1.1/mapbox-gl-directions.js
Does anyone know how (easily) I can edit the Javascript in such a way that; the Start and Destination can ónly be selected based from a pre-defined list.
PS: If anyone has any other idea of creating a javascript layover with a simple list-based Point A to Point B which returns a text-based popup/layover, on mapbox... let me know.