Web client (by @nrenner and contributors) for the BRouter routing engine (by @abrensch). Work in progress.
Instances:
- brouter.de/brouter-web (provided by @abrensch)
- brouter.damsy.net (provided by @bagage)
This repository is only about the frontend.
For the server/backend, BRouter routing engine, Android app, profiles, brouter.de site, see:
https://github.com/abrensch/brouter
More information:
https://brouter.de
General BRouter discussions/questions, support:
#brouter
on IRC OFTC. You can also use Riot.- Google Group
Translations are managed using the Transifex platform. After signing up, you can go to BRouter's project page, select a language and click Translate to start translating.
As an alternative to the above online version, the standalone server of BRouter can also be run on your local desktop.
-
download and unzip latest standalone archive (
brouter-web-standalone.<version>.zip
) from https://github.com/nrenner/brouter-web/releases e.g. for Linux (replace~/opt/
with your preferred install directory and0.11.0
with latest version):mkdir ~/opt/brouter cd ~/opt/brouter wget https://github.com/nrenner/brouter-web/releases/download/0.11.0/brouter-web-standalone.0.11.0.zip unzip brouter-web-standalone.0.11.0.zip
-
download one or more data file(s) (rd5) into
segments4
directory
In the brouter-web
subdirectory:
- copy
config.template.js
toconfig.js
- add your API keys (optional)
copykeys.template.js
tokeys.js
and edit to add your keys
- start
./run.sh
brouter-web can be run as a Docker container, making it easy for continous deployment or running locally without having to install any build tools.
The Dockerfile
builds the application inside a NodeJS container and copies the built application into a
separate Nginx based image. The application runs from a webserver only container serving only static files.
- Docker installed
- working directory is this repository
config.template.js
copied toconfig.js
and modified with a Brouter server, seeBR.conf.host
keys.template.js
tokeys.js
and add your API keys- Optionally create
profiles
directory withbrf
profile files and add path toconfig.js
: BR.conf.profilesUrl = 'profiles/';
To build the Docker container run:
docker build -t brouter-web .
This creates a Docker image with the name brouter-web
.
To run the previously build Docker image run:
docker run --rm --name brouter-web \
-p 127.0.0.1:8080:80 \
-v "`pwd`/config.js:/usr/share/nginx/html/config.js" \
-v "`pwd`/keys.js:/usr/share/nginx/html/keys.js" \
-v "`pwd`/profiles:/usr/share/nginx/html/profiles" \
brouter-web
This command does the following:
- Runs a container with the name
brouter-web
and removes it automatically after stopping - Binds port 80 of the container to the host interface 127.0.0.1 on port 8080
- Takes the absolute paths of
config.js
,keys.js
andprofiles
and mounts them inside the container - Uses the image
brouter-web
to run as a container
brouter-web should be accessible at http://127.0.0.1:8080.
yarn
yarn build #for release
yarn build debug #for development
yarn serve
Copyright (c) 2018 Norbert Renner and contributors, licensed under the MIT License (MIT)
- BRouter (not included)
by abrensch; GNU General Public License, version 3.0 (GPLv3) - Leaflet
Copyright (c) 2010-2014, Vladimir Agafonkin; Copyright (c) 2010-2011, CloudMade; 2-clause BSD License - leaflet-routing
Copyright (c) 2013, Turistforeningen, Hans Kristian Flaatten. All rights reserved. 2-clause BSD License - Leaflet.Elevation
Copyright (c) 2013 Felix Bache; MIT License - D3.js
Copyright (c) 2013, Michael Bostock. All rights reserved.; 3-clause BSD License - Leaflet.Editable
Yohan Boniface; WTFPL licence - Leaflet Control Geocoder
Copyright (c) 2012 sa3m, Copyright (c) 2013 Per Liedman; 2-clause BSD License - leaflet-plugins
Copyright (c) 2011-2012, Pavel Shramov; 2-clause BSD License - Async.js
Copyright (c) 2010-2014 Caolan McMahon; MIT License - Bootstrap
Copyright (c) 2011-2014 Twitter, Inc; MIT License - jQuery
Copyright 2005, 2014 jQuery Foundation and other contributors; MIT License - DataTables
Copyright (C) 2008-2014, SpryMedia Ltd.; MIT License - Leaflet.EasyButton
Copyright (C) 2014 Daniel Montague; MIT License - Bootbox
Copyright (C) 2011-2014 by Nick Payne; MIT License - bootstrap-slider
Copyright (c) 2015 Kyle Kemp, Rohit Kalkur, and contributors; MIT License - Leaflet.RestoreView
Copyright (c) 2012 Makina Corpus, MIT License - Leaflet.Locate
Copyright (c) 2014 Dominik Moritz, MIT License - Font Awesome
by Dave Gandy; SIL OFL 1.1 (Font), MIT License (Code), CC BY 3.0 (Documentation) - url-search-params
Copyright (C) 2015-2017 Andrea Giammarchi - @WebReflection; MIT License - bootstrap-select
Copyright (c) 2012-2018 SnapAppointments, LLC; MIT License - leaflet-sidebar-v2
Copyright (c) 2013 Tobias Bieniek; MIT License - CodeMirror
Copyright (C) 2017 by Marijn Haverbeke marijnh@gmail.com and others; MIT License - Map BBCode
Ilya Zverev; Do What The F*ck You Want To Public License - Leafet.StravaSegments
Copyright (c) 2018 Gautier Pelloux-Prayer; MIT License - polyline
Copyright (c), Development Seed; BSD 3-Clause License - leaflet-fullHash
Copyright (c) 2014 KoGor; MIT License - Turf.js
Copyright (c) 2019 Morgan Herlocker; MIT License - i18next, i18next-browser-languageDetector, i18next-xhr-backend, jquery-i18next
Copyright (c) 2017 i18next; MIT License - Leaflet TriangleMarker
Copyright (c) 2018 Przemysław Melnarowicz; MIT License - jsTree
Copyright (c) 2014 Ivan Bozhanov; MIT License - Leaflet.snogylop
Copyright (c) 2014 Eric Brelsford; MIT License - JOSM maps
imagery database is licensed under CC-BY-SA - LayersCollection
Copyright (c) 2016 Eduard <edward17>; MIT License - Leaflet-providers
Copyright (c) 2013 Leaflet Providers contributors All rights reserved.; 2-clause BSD License - Fetch polyfill
Copyright (c) 2014-2016 GitHub, Inc.; MIT License - Promise Polyfill
Copyright (c) 2014 Taylor Hakes, Copyright (c) 2014 Forbes Lindesay; MIT License - Leaflet.FileLayer
Copyright (c) 2012 Makina Corpus; MIT License - togeojson
Copyright (c) 2016 Mapbox All rights reserved.; 2-clause BSD License - Leaflet.GeometryUtil
Copyright (c) 2013, Makina Corpus; BSD 3-Clause License - leaflet-distance-markers
Copyright (c) 2014- Doroszlai Attila, 2016- Phil Whitehurst; MIT License - Leaflet.hotline
Copyright (c) 2015, iosphere GmbH, Jonas Coch; Leaflet.hotline