BikeTourPlanner offline application

I created an open source GPLv3 nwjs desktop application called BikeTourPlanner for offline planning of bicycle tours based on the GraphHopper routing engine, its web interface, and OSM2VectorTiles. End-user documentation can be found on the github io BikeTourPlanner project page.

The project is implemented on my GraphHopper master branch and includes a few bicycle related improvements to the GraphHopper routing engine, which did not make its way into the master tree, such as summarization of way type information, smoothing of elevation data, and the possibility to dynamically influence the weighting based on elevation and nice level.

The GUI extensions are implemented by extensions of the Graphhopper web project.

I intend to create a first official release for end-users once the OSM2VectorTiles project has released a license friction free tile set. According to the O2M2VectorTiles postings this might be by the end of this year. In the meantime software developers or technically skilled people should be able to play around, test and use the application by following the developers documentation at the end of the github source project page.

The bicycle related map features are implemented in two vectortiles overlays. The project git contains data for the Liechtenstein area. I have theses overlays available for world wide coverage, but they are currently not available online anywhere as I do not have server space with sufficient bandwidth for the hosting the 1.5GB data. As far as I understood the github documentation for releases it should be possible to include them to a release, so I intend to try it this way.

The tested platforms are Linux (Ubuntu 16.04 64 bit) and Microsoft Windows 64 bit, 32 bit should work as well.
Implementation of support for Mac OS X 64-bit should be possible with a few changes. Pull requests, bug reports and feature extension ideas for the future are welcome! :wink:

2 Likes

Really nice! Will try it out soonish and let me know if we should help with announcing :slight_smile:

Please do not yet announce it for none develpers until I gathered a few feedback. Although I did perform quite some tests, I still do find occasional corner cases which do not work as intended. Just today I found one.

1 Like

How to install this? Are there some instructions, via graphhopper.sh script or a pre-built zip?

I’m very sorry that I missed this question. Please follow the instructions for developers at the buttom of https://github.com/ratrun/biketourplanner .

1 Like

This is a bit hidden. Also you should correct the links in the description to improve readability and list the required steps instead of hiding them in the description like

  1. execute xy
  2. install nw via xy
  3. …

Just my hints from a lazy dev perspective :wink:

Hmmh, I get an empty window with two tabs on the left and the following error:

routingLayer.clearLayers();
TypeError: Cannot read property 'clearLayers' of undefined

And do I need to install the tiles and GH files somewhere?

You do not need to install tiles. At the initial start you should get a notification popup that the routing data is beeing calculated. After a little while you should see the map, but here your installation has some problems.

Did you properly clone the git subproject under ‘web\src\main\webapp\ratrun-mbtiles-server’ and run ‘npm install’ in this folder? Please check and provide the complete console log in case that it still does not work.

Thanks for the suggestions about improvement for develpopers documentation. I’m going to include it.

What is the exact command to clone the subproject? (I do not like git submodules and so have no experience :slight_smile: )

I had to look that up, as I’m usually using a GUI. But in the meantime I have updated the instructions and cross tested. Please follow it.
The intial command is git clone --recursive https://github.com/ratrun/biketourplanner, so probably you need to do a git pull --recursive now.

Thanks, got it working - look nice!

This works really well already. When I tried to download an area I get the error mentioned above:

chrome-extension://ellfjaegcdfheaeeibfihelkjheakfom/js/main.js?v=0.8.0:4581
    routingLayer.clearLayers();
                ^

TypeError: Cannot read property 'clearLayers' of undefined
    at Object.module.exports.clearLayers (chrome-extension://ellfjaegcdfheaeeibfihelkjheakfom/js/main.js?v=0.8.0:4581:17)
    at stopLocalVectorTileServer (chrome-extension://ellfjaegcdfheaeeibfihelkjheakfom/js/main.js?v=0.8.0:5005:12)
    at HTMLDivElement.Download (chrome-extension://ellfjaegcdfheaeeibfihelkjheakfom/js/main.js?v=0.8.0:5231:45)
    at HTMLButtonElement.<anonymous> (chrome-extension://ellfjaegcdfheaeeibfihelkjheakfom/js/main.js?v=0.8.0:1768:13549)
    at HTMLButtonElement.dispatch (chrome-extension://ellfjaegcdfheaeeibfihelkjheakfom/js/lib/jquery-1.12.4.min.js:3:12444)
    at HTMLButtonElement.r.handle (chrome-extension://ellfjaegcdfheaeeibfihelkjheakfom/js/lib/jquery-1.12.4.min.js:3:9173)

And then I tried to manually download an area and put it in the osm folder (named under ‘download osm file’), but even after restart the app it did not show up under ‘show installed maps’ nor was I able to click on ‘calculate new routing graph’. Also there is no ‘exit’ entry in the menu nor the ‘x’ button worked for me, had to CTRL+C the ‘nw .’ process

Thank you for testing. It looks as that you downloaded a new OSM file.

You should have got a dialog indicating: After the download has finished, the new file should show up in the Calculate new routing graph submenue from the Routing menu.

This text is missleading. The “Calculate new routing graph” menu item is disabled as long as a graphhopper server is running. You currently need to manually stop it before the menu item shows up. I need to think about this. The easy solution is to add information for the user that a manual trigger for the stop is needed. All other ways would become very complex. The problem is that the download is performed via the external browser. I do not know when it finished, so I would need to poll for a new file, which name I also do not know.

And then I tried to manually download an area and put it in the osm folder (named under ‘download osm file’), but even after restart the app it did not show up under ‘show installed maps’ nor was I able to click on ‘calculate new routing graph’. Also there is no ‘exit’ entry in the menu nor the ‘x’ button worked for me, had to CTRL+C the ‘nw .’ process

The map features and the routing features are completely separated. This means that changing a region requires the user to switch the map in one step and in a second step to seperatly switch the covered routing area. The reason is that the data comes from two separated sources. I expected that people will not notice this. But I didn’t expect that even you would not notice. I’m already describing it at the prominentes place I could find in the description. I have no ideas how I could improve that.

I cannot reproduce your execption. Could you please describe in detail what you did, maybe by including more log intformation from the actions before? Did you download the OSM file as *.pbf or as *.osm?

Also there is no ‘exit’ entry in the menu nor the ‘x’ button worked for me, had to CTRL+C the ‘nw .’ process

It looks as you are on Linux. I guess that you tried to close the application while the graph was beeing calculated. It is likely that there is some problem here, I have never tried it.

Could you please try your steps again and press F12 before to capture a log?

I updated the dialog text for the OSM file download. Additionally compared to the version from yesterday, the support for POI “mountain_pass” is now pushed to git. The mouse hovering feature is supported for this new POI. The latest grahhopper master core is merged and active.

I figured out how to redirect console log output to a file: In case that the start command line is changed into nw --enable-logging=stderr 1>&2 2>logfile.txt console log output is written to the file logfile.txt.