'How to create a route between markers?

I would like to create a map (preferably something like leaflet) with markers and a route (chosen by coordinates that I give) between these markers.

To be more specific, I would like to be able to trace a hiking trail with clickable markers on the hiking trail.

I have found this plugin https://www.liedman.net/leaflet-routing-machine/ but it seems to be no longer maintained (to make it work, I need to configure a routing backend myself and I am not sure how to do it).

Is it something that I could do "manually" if such a plugin does not exist ?



Solution 1:[1]

Well, although this is an old question, I want to reply as I think this is a very searched topic. Every plugin in leaflet related to routing needs a routing machine in the backend. Leaflet.js is the frontend. There are very good alternatives (they even work with Docker, so very straightforward) to use as backend routing machines. Openrouteservices is your friend: dockerized (if you want to use your own infrastructure), fast, written in JAVA and easy to use.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ethiel