Show Mapbox route based on predefined waypoints

Hi. Anybody experience using Mapbox to show route based on predefined data of waypoints? I have a multiple waypoints (lat, lng) that I want to plot with marker and show route connecting those waypoints.

Mapbox gave html example of how to show route by selecting point A and B on the map. But I don’t want my user to choose anymore, the data of locations/waypoints already predefined in database.

I don’t know how edit this html because I do not know how to code. Any help is appreciated. Thank you.


I used the bubble’s HTML element to embed the complete HTML from mapbox. I can see the map as well as the animation playing.
Remember to remove the first line for “doctype”. That was throwing a generic error during preview.

hi @globaleyesin ,

Thank you for your reply.

Would you mind sharing me the html code you are using to display route for multiple waypoints? I couldn’t find the right example for my use case.

@globaleyesin , hi!
Did you find the solution for your problem? I have such a problem too.