diff --git a/LICENSE b/LICENSE index 50d8243..b636a1f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2015, Per Liedman (per@liedman.net) +Copyright (c) 2015, Mathias Rohnstock (m.rohnstock@gmail.com) Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. diff --git a/README.md b/README.md index fdb0d0d..536958e 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,39 @@ -Leaflet Routing Machine / GraphHopper -===================================== +Leaflet Routing Machine / TomTom +================================ -[![npm version](https://img.shields.io/npm/v/lrm-graphhopper.svg)](https://www.npmjs.com/package/lrm-graphhopper) - -Extends [Leaflet Routing Machine](https://github.com/perliedman/leaflet-routing-machine) with support for [GraphHopper](https://graphhopper.com/). +Extends [Leaflet Routing Machine](https://github.com/perliedman/leaflet-routing-machine) with support for [TomTom](http://developer.tomtom.com/io-docs). 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 -Go to the [download page](http://www.liedman.net/lrm-graphhopper/download/) to get the script to include in your page. Put the script after Leaflet and Leaflet Routing Machine has been loaded. +Install nodejs/iojs, clone this repository and execute: + +```sh +npm install +./scripts/dist.sh +``` + +Put the script after Leaflet and Leaflet Routing Machine has been loaded. To use with for example Browserify: ```sh -npm install --save lrm-graphhopper +npm install --save lrm-tomtom ``` -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.GraphHopper`. 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: +There's a single class exported by this module, `L.Routing.TomTom`. 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-graphhopper'); // This will tack on the class to the L.Routing namespace +require('lrm-tomtom'); // This will tack on the class to the L.Routing namespace L.Routing.control({ - router: new L.Routing.GraphHopper('your GraphHopper API key'), + router: new L.Routing.TomTom('your TomTom API key'), }).addTo(map); ``` -Note that you will need to pass a valid GraphHopper API key to the constructor. +Note that you will need to pass a valid TomTom API key to the constructor. diff --git a/examples/index.html b/examples/index.html index b8bdc19..3a7f63d 100644 --- a/examples/index.html +++ b/examples/index.html @@ -11,7 +11,7 @@
- +