Stylesheets
A stylesheet is a configuration file for a renderer that determines the content (what should be displayed) of a map and its style (how the content is displayed). The stylesheet contains the answers to questions like 'what types of roads should be shown on the map' and if so, 'What color should these types of roads be ?' and 'What should be the width of the roads ?'
There are different formats for stylesheets:
Format | File | renderer | Note |
---|---|---|---|
Mapnik XML | .xml |
Mapnik | |
CartoCSS | .mml , .mss |
Mapnik | Has to be converted to Mapnik XML. |
Mapbox Style | .json |
Mapbox GL | Also used by MapLibre. |
MapCSS | .mapcss |
used by several | Used by overpass turbo, JOSM and other projects. |
Default style
www.openstreetmap.org by default uses the OpenStreetMap Carto style, which was ported in November 2012 from the previous Mapnik style.
The other featured tile layers are CyclOSM, OpenCycleMap, Transport Map, Tracestrack Topo and Humanitarian.
Stylesheet editors
CartoCSS styles can be edited with TileMill and Kosmtik.
Mapbox styles can be edited with Mapbox Studio and Maputnik.
Resources
- 2016-05-13: The end of CartoCSS - Tom MacWright (note that CartoCSS is still maintained and still heavily used by OSM)
- 2012-11-02: CSS For Maps - Tom MacWright
Stylesheets elsewhere
What can we learn from the way non-osm systems define map styles? and what compatibility can we provide?
- google maps "StyledMaps" config
- a geographic centered color chooser
Discontinued software
- Cascadenik is a discontinued Mapnik XML-preprocessor that inspired CartoCSS
- Osmarender had its own Osmarender stylesheets and Rules
- Gosmore has its own Gosmore stylesheets