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:

FormatFile extensionsTargeted rendererNote
Mapnik XML.xmlMapnik
CartoCSS.mml, .mssMapnikHas to be converted to Mapnik XML.
Mapbox Style.jsonMapbox GLAlso used by MapLibre.
MapCSS.mapcssused by severalUsed 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, ÖPNVKarte and HOT style.

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

This article is issued from Openstreetmap. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.