• Stars
    star
    1,024
  • Rank 43,304 (Top 0.9 %)
  • Language
    JavaScript
  • License
    Other
  • Created over 10 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Control for routing in Leaflet

Leaflet Routing Machine NPM version Leaflet 1.0 compatible! Join the chat at https://gitter.im/leaflet-routing-machine/Lobby

This plugin is barely maintained! It has been a good long while since I had any reason to work with routing or Leaflet, and it does not look like that will change. I do not spend time on maintaining this plugin, and only rarely can I find time to respond to issues. If you want to take over as maintainer, feel free to contact me at [email protected].

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

Features

  • 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.

Building

npm install

This requires Node and npm, as well as grunt.

Usage

Download latest release, or obtain the latest release via unpkg.com.

<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet-routing-machine.css" />
<script src="https://unpkg.com/[email protected]/dist/leaflet-routing-machine.js"></script>

or via npm:

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

...

LRM attaches itself onto L.

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

More Repositories

1

leaflet-realtime

Put realtime data on a Leaflet map
JavaScript
720
star
2

leaflet-control-geocoder

A simple geocoder form to locate places. Easily extended to multiple data providers.
TypeScript
510
star
3

geojson-path-finder

Find shortest path through a network of GeoJSON
TypeScript
270
star
4

reproject

Change, convert, transform, reproject GeoJSON between different projections / CRS
JavaScript
212
star
5

query-overpass

Make queries to OpenStreetMap's overpass API and output as GeoJSON
JavaScript
147
star
6

raytracing-in-one-weekend

Rust implementation of the book Ray Tracing in One Weekend
Rust
94
star
7

tiled-maps

A short, free and open introduction to the concept of tiled maps
HTML
61
star
8

shadow-mapper

Generate maps of sun and shade from OpenStreetMap data
Python
56
star
9

elevation-service

Elevation data for your GeoJSON as a micro service
JavaScript
46
star
10

node-hgt

Query hgt files (typically SRTM elevation data) with performance
JavaScript
45
star
11

geojson-elevation

Add juicy elevation data to your fresh GeoJSON
JavaScript
38
star
12

ocad2geojson

JavaScript OCAD file reader and exporter for GeoJSON, SVG and Mapbox Style Spec
JavaScript
32
star
13

lrm-graphhopper

Support for GraphHopper in Leaflet Routing Machine
JavaScript
30
star
14

leaflet-underneath

Find interesting features is in your map using Mapbox Vector Tiles data
JavaScript
30
star
15

openlayers-routing-machine

A complete user interface for routing within an OpenLayers map
HTML
18
star
16

geojson2obj

Convert GeoJSON into Wavefront OBJ format
JavaScript
17
star
17

osm-slope

Calculate slope (climb and descent) for highway ways in OpenStreetMap data.
JavaScript
17
star
18

leaflet-touch-helper

Make it easy to touch things in Leaflet
JavaScript
17
star
19

svenska-landskap

Sveriges landskap som öppen geodata i GeoJSON
Shell
13
star
20

terrain-obj

Convert elevation data (typically SRTM elevation data, HGT files) to Wavefront OBJ 3D models
JavaScript
12
star
21

gis-nerd-tools

Simple but awesome web based tools for GIS enthusiasts
JavaScript
10
star
22

o-scout

A web based app for orienteering course setting and exploration
JavaScript
9
star
23

osmwave

Convert OpenStreetMap buildings and roads into Wavefront OBJ 3D models.
C++
7
star
24

leaflet-multi-style

Quickly add multiple styles to GeoJSON data
JavaScript
7
star
25

leaflet-raster

A simple Leaflet plugin for powerful raster functions
JavaScript
7
star
26

raster-blaster

Blast multi-band rasters to a canvas with speed and style.
JavaScript
6
star
27

cykelbanor

Bike routing for Sweden
JavaScript
5
star
28

gps-log-viewer

Web UI from gps-log
JavaScript
5
star
29

standstill

Find locations where there has been no movement, a stop, within a GeoJSON track, typically recorded from a GPS
JavaScript
5
star
30

fly-route

Fly over a map route using Mapbox GL (small demo)
JavaScript
4
star
31

course-sketcher

Web based course setting for orienteering
Vue
4
star
32

lrm-mapbox

DEPRECATED. Support for Mapbox directions API v4 in Leaflet Routing Machine
JavaScript
4
star
33

openlayers-tilejson

Create map or tile layer from TileJSON, with projection support
JavaScript
4
star
34

osm2obj

Generate Wavefront OBJ 3D models from OpenStreetMap XML or JSON
JavaScript
4
star
35

css-rankme-slack-bot

Slack bot to inform about important stats from Counter Strike Source's Rankme plugin
Python
3
star
36

brochure

Simple GeoJSON viewer based on Leaflet
JavaScript
3
star
37

lrm-svelte

Experiment making a Leaflet plugin using the Svelte framework
JavaScript
3
star
38

maptime-gbg-201602

"Let's learn Leaflet.js" presentation for Maptime GBG 2016-02
JavaScript
3
star
39

local-proj

Find a suitable local projection from GeoJSON data
JavaScript
3
star
40

jsprit.web

Server side of a simple Vechile Routing Problem solver built on jsprit
Java
2
star
41

mapbox-gl-routing-machine

A complete user interface for routing with Mapbox GL JS
JavaScript
2
star
42

roundabound

Simplistic log rotation utility
Python
2
star
43

ocad2tiles

Create raster images and tiles (image pyramids) from OCAD map files
JavaScript
2
star
44

advent-of-code

My solutions for Advent of Code
Python
2
star
45

svg-control-descriptions

IOF orienteering control descriptions as SVG
JavaScript
2
star
46

tradportalen-export

Export tree observations from Trädportalen
Shell
1
star
47

turfjs-gbgnodejs

Short introduction to turf.js @ gbgnodejs meetup
JavaScript
1
star
48

drone

Enjoy Mapbox's cloudless atlas
JavaScript
1
star
49

godwit

Minimalistic database migration tool
Python
1
star
50

vixel-test

Toying around with making voxel landscapes from height maps
JavaScript
1
star
51

memory-game

Very basic memory game I made for my kids
JavaScript
1
star
52

gps-track-import

Simple import of tracks for GPS
Python
1
star