ffwdme.js is a JavaScript toolkit that aims to bring interactive GPS driving directions to the mobile browser.
For an introduction have a look at the guides.
You can try a current build including a demo page online at dev.ffwdmejs.org
The source code is built using browserify
and gulp
so you need a working node.js environment on your local machine. I'm using node v5.0.0 right now (you can see your version with node --version
)
Check out the code from GitHub, e.g. by cloning the repository, and cd
into the main directory of ffwdme.js.
To install all dependencies just do an npm install
Then you can run gulp for a local preview server: gulp
To use the demo page on your local server, you need to sign up for some external services.
ffwdme.js uses the open source routing service GraphHopper for the route calculation. They are pretty awesome and provide us with a free demo API key to try things out. However, please be fair. Once your project gets more serious you should get in touch and obtain your own API key.
There is also a map component, that is powered by Mapbox. In order to use this, you have to sign up for a free plan and you need to get an access token.
Once you have your Mapbox access token ready, you can copy the file static/demo/credentials_example.js
to static/demo/credentials.js
.
Open the newly created file and fill in your own credentials.
Now you are ready to go!
build
- The generated JavaScript code and assetsgulp
- The single gulp tasks to build and deploy the code/assetsspec
- Spec suites and fixturessrc
- Source code, divided in the packagescore
,components
anddebug
static
- Root directory for the local preview server, that also holds the demo applicationstatic/recorded_routes
- This holds a collection of real world recorded GPS tracks, you can use to develop/debug your navigation system (see demo page)
ffwdme.js uses the following testing setup:
- Jasmine - http://jasmine.github.io/2.1/introduction.html
- Jasmine jQuery - https://github.com/velesin/jasmine-jquery/blob/master/README.md
- Karma - http://karma-runner.github.io/0.12/config/files.html
To run the specs, install the karma CLI helper globally
npm install -g karma-cli
Then make sure you have the development server running:
gulp
And then just call
karma start
ffwdme.js is an open source project by flinc.org and was initially created by Silvia Hundegger and Christian Bäuerlein