openmaptiles/style
Daniel Schep cd77b07e46
improve `class=path` styling (#1450)
This PR addresses that by:

* rendering oneway arrows on more than `subclass=cycleway`
* less opacity for path/footway casing
* adding the thin black casing to bridges
* adding `subclass=steps` & `subclass=bridleway` rendering
* render `bicycle=designated` as `subclass=cycleway` and `horse=designated` as `subclass=bridleway` (bike taking priority)
* improved tunnel rendering with double casing & adding main line
* made casing min zoom consistent across subclasses

All of these changes were made to mimic OSM Carto.
2023-01-06 10:08:03 +01:00
..
icons
README.md
config.json
style-header.json

README.md

OSM OpenMapTiles style

OSM OpenMapTiles is the official style of OpenMapTiles. Its purpose is to display all features in vector tiles.

OSM OpenMapTiles style is heavily inspired by OSM Carto.

Huge credit belongs to the original authors.

Fonts

OSM OpenMapTiles style used Noto Sans fonts. To download these fonts run:

make download-fonts

It downloads Noto Sans fonts (~70MB) and extract them into openmaptiles/data/fonts directory.

Icons/sprite

All icons which are used OpenMapTiles style are located in openmaptiles/style/icons. After the style is built, the icons are composed into sprite files located in build directory.

Additional svg icons can be added to openmaptiles/style/icons directory.

To generate new sprite files with added icons, run:

make build-sprite

Sprite files will be generated into build directory.

OSM Icons

Icons in the OSM OpenMapTiles style are based on original OSM Carto symbols.

The original icons can be found in openstreetmap-carto/symbols.

Icons used in OSM OpenMapTiles style were scaled down and saved as svg.

Build style

To build style run:

make build-style

It generates new sprite files and merges all style snippets from each layer, orders them according the order value and saves the complete style into build/style/style.json.

Tileserver-gl

The tileserver serves both the tiles and the OSM OpenMapTiles map.

MBTiles (default)

By default, the tileserver serves OSM OpenMapTiles map based on tiles from data/tiles.mbtiles as defined in style-header.json.

"sources": {
  "openmaptiles": {
    "type": "vector",
    "url": "mbtiles:///data/tiles.mbtiles"
  },
  ...
}

Serve from the db

The tileserver can also serve OSM OpenMapTiles map based on dynamically generated tiles directly from the database. Start the database container and the postserve container:

make start-db
make start-postserve

In style-header.json change the source of tiles to PostServe:

Start tileserver

Before you start the tileserver, make sure you have fonts downloaded in openmaptiles/data/fonts, sprites generated and style built:

make download-fonts
make build-style

Start tileserver:

make start-tileserver

And go to http://localhost:8080.