[Mapcss] Stacked rules question

Sebastian Spaeth Sebastian at SSpaeth.de
Wed Jul 7 08:29:21 BST 2010


Hi all, so far I don't support stacked rules but they become more
important to me now (like have a landuse=* way render at a low z-index
but the caption at a  high z-index) and I have a question as to how they
are supposed to apply. Let me give some examples which I am unsure about:

way [landuse] ] {color: blue; width: 2;}
way [landuse] ] {z-index: -1; width: 5;}

Will this yield 2 lines? (as in implicit z-index:0 and z-index:1) ?
Or do styles without explicit z-index apply to all other styles? Similarly:

way [landuse] ] {fill-color: blue;}
way [landuse] ] {z-index: 1; color:black; width: 5;}

Will this fill-color landuse areas at z-index:1 or at z-index:0?
It is also not clear in what cases styles are supposed to be
merged/update each other:

way [landuse] ] {z-index: 2; color: blue; width: 5;}
way [landuse] ] {z-index: 1; color: red; width: 5;}
                {z-index: 2; color: green; width: 2;}

this will lead to 2 rules one at z-index:1 (red) and one at z-index:2
(green), right? (So they are updated when the z-index is equal and not
lead to 2 lines at z:2)

and finally:

way [landuse] ] {z-index: 2; color: blue; width: 2;}
way [landuse] ] {z-index: 1; color: red; width: 5;}
                {z-index: eval('somenumber'); color: green; width: 5;}

Is this supposed to work? If 'somenumber' is 2, is this style supposed
to be merged into the first style? This would be a heck of a lot
calculating (so far, I merge/update stylesheets on loading the
stylesheets and not on element evaluation time). Or would it be a
reasonable restriction to say that dynamically calculated z-index value
rules are never merged into other rules at the same z-index?

Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/mapcss/attachments/20100707/8bc5c5b3/attachment.pgp>


More information about the Mapcss mailing list