Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/trailbehind/lrm-pointtopoint
A Router for Leaflet Routing Machine that doesn't do any routing.
https://github.com/trailbehind/lrm-pointtopoint
Last synced: 3 days ago
JSON representation
A Router for Leaflet Routing Machine that doesn't do any routing.
- Host: GitHub
- URL: https://github.com/trailbehind/lrm-pointtopoint
- Owner: trailbehind
- License: isc
- Created: 2015-04-24T17:33:06.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-12T16:58:32.000Z (about 8 years ago)
- Last Synced: 2023-04-21T10:26:36.117Z (over 1 year ago)
- Language: JavaScript
- Size: 12.7 KB
- Stars: 1
- Watchers: 25
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Leaflet Routing Machine / PointToPoint
=====================================A Router for Leaflet Routing Machine that doesn't do any routing.
Some brief instructions follow below, but the [Leaflet Routing Machine tutorial on alternative routers](http://www.liedman.net/leaflet-routing-machine/tutorials/alternative-routers/) is recommended.
## Installing
To use with for example Browserify:
```sh
npm install --save lrm-pointtopoint
```There's not pre-built files yet, but I will get to it.
## Using
There's a single class exported by this module, `L.Routing.PointToPoint`. It implements the [`IRouter`](http://www.liedman.net/leaflet-routing-machine/api/#irouter) interface. Use it to replace Leaflet Routing Machine's default OSRM router implementation:
```javascript
var L = require('leaflet');
require('leaflet-routing-machine');
require('lrm-pointtopoint'); // This will tack on the class to the L.Routing namespaceL.Routing.control({
router: new L.Routing.PointToPoint(),
}).addTo(map);
```