Stylesheets

From OpenStreetMap Wiki
(Redirected from Styles)
Jump to navigation Jump to search
Stylesheet.jpg

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

Stylesheets elsewhere

What can we learn from the way non-osm systems define map styles? and what compatibility can we provide?

Discontinued software