Need help with leaflet-routing-machine?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

810 Stars 281 Forks Other 489 Commits 95 Opened issues


Control for routing in Leaflet

Services available


Need anything else?

Contributors list

Leaflet Routing Machine NPM version Leaflet 1.0 compatible! Join the chat at

Find the way from A to B on a Leaflet map. The plugin supports multiple backends:


  • Standard Leaflet control, with Leaflet look and feel
  • Routing from start to destination, with possibility of via points
  • Add, edit and remove waypoints through both address input and using the map
  • Multiple language support
  • Highly customizable for advanced use
  • Customizable look (theming / skins)
  • Open Source released under ISC License (more or less equivalent with the MIT license)

Go to the Leaflet Routing Machine site for more information, demos, tutorials and more.

Update 2020-04-06: Out of the box, Leaflet Routing Machine relies on OSRM's demo server. At this moment, the demo server (which is outside scope of the plugin and outside control of the plugin's author) is no longer maintained, and its SSL certificate has expired. The plugin will not work unless you configure a routing backend yourself. I am sorry to say that, to my knowledge, there is no good default.

Support and New Features

Leaflet Routing Machine is in many ways already a feature complete routing UI. Most likely, your requirements are already covered and require very little adaptation.

For questions and discussions, you might want to look at the Leaflet Routing Machine gitter.


npm install

This requires Node and npm, as well as



Download latest release, or obtain the latest release via

or via npm:

npm install --save leaflet-routing-machine
var L = require('leaflet');


LRM attaches itself onto


Go to the Leaflet Routing Machine site for more information, demos, tutorials and more.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.