Leaflet TrackDrawer is a plugin for Leaflet to easily draw tracks while using custom routing algorithms.
L.TrackDrawer.Track provides the low-level APIs to add, move & delete waypoints. It also supports saving and restoring state, as well as undoing and redoing actions.
The plugin also comes with an optional toolbar
L.TrackDrawer.ToolBar which implements all the interactions for you.
If you wish to have multiple routing algorithms, there is an additional toolbar
L.TrackDrawer.TraceModeBar which lets the user easily switch between modes.
A real-case usage of this plugin is for map2gpx.
Other plugins are available to extend/use TrackDrawer: