Giter Site home page Giter Site logo

joe-akeem / singletrail-tiles Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.54 MB

Additional maps and overlays for https://bikerouter.de/ or https://gpx.studio that highlight singletrails for mountain biking.

maps mbtiles mbtileserver mountain-bike mtb singletrails

singletrail-tiles's Introduction

singletrail-tiles

Additional maps and overlays for https://bikerouter.de (or https://gpx.studio) that highlight singletrails for mountain biking. They can be added as custom base maps and overlays.

Introduction

https://bikerouter.de and https://gpx.studio are tremendously useful tools to prepare GPX tracks for cycling adventures. However, I was never happy with the available options of maps and overlays highlighting singletrails for mountain biking that would let me choose the best singletrails according to my bike riding skills. Being used to the swiss map style I was looking for something that looked like a swisstop map with simple highlights of singletrails from green to black (just like ski pistes) according to their difficulites.

Singletrail Map

Serving the Singletrail Map Tiles

The singletrail map is served to e.g. https://bikerouter.de as .png tiles by a map tile server that is running on your local computer. https://bikerouter.de will automatically load the .png tiles as needed when scrolling the map.

Prerequisites

In order to run this project locally you need git as well as docker and docker-compose installed on your computer.

Additionally, an .mbtiles file containing the map data must be generated first for the desired area. Use my openmaptiles-singletrailmap project to create an .mbtiles file for the desired area. For example to create suitable data for the area of the whole alps, you would run

./quickstart.sh europe/alps

in that project. The resulting tiles.mbtiles file must then be copied to this project's data folder.

Running the Tile Server

  1. Clone the project to your local computer:
git clone https://github.com/joe-akeem/singletrail-tiles.git; cd singletrail-tiles
  1. Copy the tiles.mbtiles file (see above):
mkdir data; cp ../openmaptiles-singletrailmap/data/tiles.mbtiles data
  1. Run the tile server:
docker-compose up

In order to verify that the tile server is running properly visit http://localhost:8080/. You should be able to inspect the data as well as a list of map styles.

Adding the custom Singletrail Basemap and Overlays to bikerouter.de

From the main page at http://localhost:8080/ you can navigate to the TileJSON definitions of each style. Each style has an individual URL at which the map tiles are served. They look something like http://localhost:8080/styles/mtb/{z}/{x}/{y}.png. These URLs are the ones https://bikerouter.de (or https://gpx.studio) needs to request the map tiles depending on the currently displayed section of the map.

Here is a list of the provided styles along with the URLs that are relevant to https://bikerouter.de and https://gpx.studio:

Style Description Tiles URL
mtb A map style that can be used as an overlay to highlight the paths on the map that have an mtb_scale tag according to OSM. The paths are highlighted using different colors depending on the riding difficulty (green for S0, blue for S1 etc.) http://localhost:8080/styles/mtb/{z}/{x}/{y}.png
mtb_potential A map style that can be used as an overlay to highlight the paths on the map that might be suitable for MTB riding but that don't have an mtb_scale tag according to OSM. The paths are highlighted using different colors depending on the how likely they are suited (based on some other tags like hiking difficulty etc. Orange means higher potential than yellow) http://localhost:8080/styles/mtb_potential/{z}/{x}/{y}.png
singletrailmap A map that can be used as a base map. It is a complete map style that is similar to the swisstopo style and that has additionally the singletrails highlighted as in the mtbstyle above. This map can be combined with other overlays in gpx.studio. http://localhost:8080/styles/singletrailmap/{z}/{x}/{y}.png

The map layers can be added to e.g. https://bikerouter.de as custom layers. Make sure you choose the right layer type. Overlay is meaningful for the mtband mtb_potential styles while singletrailmap is more suitable as Basemap.

Once the custom layers have been added in https://bikerouter.de or https://gpx.studio, they can be randomly mixed with the already existing layers.

Custom Layers

singletrail-tiles's People

Contributors

joachimlengacher avatar joe-akeem avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.