Important note: This GL style was historically the first version of CyclOSM. We shifted back to a more traditional CartoCSS style and the GL style is no longer maintained and left here for historical reasons. For the up to date and latest CyclOSM source code, check out https://github.com/cyclosm/cyclosm-cartocss-style/.
This is a Mapbox GL basemap style using the vector tile schema of OpenMapTiles, with cycling in mind.
It is based on the Klokantech basic GL style. Icons are taken from OSM Bright GL style.
Note: This is currently a Work In Progress and therefore requires some OpenMapTiles schema updata to have a full render. An up to date OpenMapTiles branch is available here. PRs will be systematically submitted to OpenMapTiles for each new addition.
A demo with tiles generated for Ile-de-France area is available here (using OpenLayers) or here (using Mapbox GL JS).
You should update the style.json
file and replace
{{ TILE_URL }}
with the URL of your OpenMapTiles provider.{{ SPRITE_URL }}
with the URL of the built sprites (see below).{{ GLYPHS_URL }}
with an URL serving the fonts.
You can have a look at the examples
folder for usage examples
with OpenLayers or Mapbox GL
JS with tiles generated for
Ile-de-France area.
To use this style, you should build sprites from the icons in the icons/
folder.
This requires nodejs <= 8.x
and mapnik 3.0.x
. On Ubuntu, you can apt-get install libmapnik-dev
and use this Node v8.x
repo.
Note: If you have a higher version of Node, you will have to install
mapnik
from
source. This is due
to node-mapnik
being required to
build the sprites. [email protected]
requires NodeJS version 8 or lower and
mapnik 3.0.x
and [email protected]
is compatible with higher versions of
NodeJS but requires a Git version of mapnik
.
Then, you can install the required JS dependencies with
$ npm install
and use ./scripts/build.sh
to build the sprites. Everytime you update the
icons, you should run ./scripts/build.sh
again, to rebuild the sprites.
Note: If you get "Error: libmapnik.so.4.0: cannot open shared object file:
No such file or directory" when running build.sh
script, try to prefix it
with
LD_LIBRARY_PATH
.
For instance, LD_LIBRARY_PATH=/usr/local/lib ./scripts/build.sh
.
Use the Maputnik CLI to edit and develop the style.
After you've started Maputnik open the editor on localhost:8000
.
$ maputnik --watch --file style.json
Code is licensed under BSD-3-Clause and design is licensed under CC BY 4.0. Full details on the license can be found in the LICENSE.md file.