Skip to content

Commit 169f3da

Browse files
wadclappperliedman
authored andcommitted
update readme with usage instructions (#494)
currently there are no instructions on how to get started when using npm and including js files. Using webpack and `import` causes errors for me, but this works.
1 parent 82da838 commit 169f3da

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,29 @@ npm install
3838
```
3939

4040
This requires [Node and npm](http://nodejs.org/), as well as `grunt`.
41+
42+
# Usage
43+
44+
Download [latest release](https://github.com/perliedman/leaflet-routing-machine/releases), or obtain the latest release via [unpkg.com](https://unpkg.com/).
45+
46+
```html
47+
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet-routing-machine.css" />
48+
<script src="https://unpkg.com/[email protected]/dist/leaflet-routing-machine.js"></script>
49+
```
50+
51+
or via npm:
52+
53+
```sh
54+
npm install --save leaflet-routing-machine
55+
```
56+
57+
```javascript
58+
var L = require('leaflet');
59+
require('leaflet-routing-machine');
60+
61+
...
62+
```
63+
64+
LRM attaches itself onto `L`.
65+
66+
__Go to the [Leaflet Routing Machine site](http://www.liedman.net/leaflet-routing-machine/) for more information, demos, tutorials and more.__

0 commit comments

Comments
 (0)