[Mapcss] Potlatch 2 stylesheet changes

Richard Fairhurst richard at systemeD.net
Sun Jun 12 20:40:47 BST 2011


Hi all,

The next version of Potlatch 2 will have a couple of major changes to 
the MapCSS parser that you need to know about if you're writing custom 
stylesheets. These are to bring it in line with other software that 
understands MapCSS.

The changes are:

1. casing-width is now relative to the stroke width.
	OLD: { width: 5; casing-width; 7; }
	NEW: { width: 5; casing-width: 1; }

2. Separate strokes for the same way (or whatever) should now be given 
distinct 'subpart' names, rather than relying on z-index to separate 
them. Subparts are defined by appending '::name' to the selector.
	OLD:
		way[highway=primary] { color: red; width: 5; z-index: 2}
		relation[type=route] way { color: blue; width: 7; z-index: 1}
	NEW:	
		way[highway=primary] { color: red; width: 5; z-index: 2}
		relation[type=route] way::routehighlight { color: blue; width: 7; 
z-index: 1}

The code for this is in my refactor branch on github 
(https://github.com/systemed/potlatch2/tree/refactor) should you want to 
try it out. Before it goes live I'll make the changes to the bundled 
styles; the Potlatch style is already mostly adapted.

cheers
Richard




More information about the Mapcss mailing list