A stylesheet is the code, usually located in a dedicated file, 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 ?'
Stylesheets are written in various languages, including Cascadenik, CartoCSS, Mapcss or XML. There are many different approaches to configure the rendering of maps in Openstreetmap (generally a different approach is used for each rendering software) :
- The CartoCSS stylesheet used in the main map displayed on osm.org : https://github.com/gravitystorm/openstreetmap-carto
- The stylesheet formerly used in the main map displayed on osm.org : https://trac.openstreetmap.org/browser/applications/rendering/mapnik/osm.xml
- Mapnik's wiki page of stylesheets - add yours: https://github.com/mapnik/mapnik/wiki/StyleShare
- Mapnik XML styles used on wikimedia toolserver https://svn.toolserver.org/svnroot/p_osm/styles/
- This is the lua script that handles some of the styling in the main map displayed on osm.org: https://github.com/openstreetmap/osm2pgsql/blob/master/style.lua
- Osmarender stylesheet and Rules
- Gosmore stylesheets
- TileMill uses Carto to render with Mapnik.
What can we learn from the way non-osm systems define map styles? and what compatibility can we provide?