[Mapcss] multi-strokes and subparts

Sebastian Klein bastikln at googlemail.com
Tue Jul 13 22:09:53 BST 2010


Sebastian Spaeth wrote:
> On 2010-07-11, Sebastian Klein wrote:
>> Sebastian Spaeth wrote:
>> Question: You say that subpart styles override generic style even if it
>> comes later in the file. And the line
>>
>>> way [highway]::*
>> suggests that it applies to all subparts and consequently overrides them
>> all if it comes later in the file. But you write it is synonym to "way
>> [highway]", could you clarify?
> 
> Well, I just made ::* be a synonym for the generic case for now. And
> generic rules never override rules for specific subparts. But that is
> mainly just to make my implementation easier. I agree that ::* should
> probably override things too.
>  
>> Btw., it could be useful to be able to override style for all subparts:
>> E.g. override the anti-aliasing for efficiency or make everything
>> transparent (by a certain factor (?)), ...
> ?
> Can you give an example? Like this:
> 
> way [highway]::centerline {bezier:yes;} 
> way [highway]::highlight {bezier:yes;} 
> 
> way [highway]::* {bezier:no;} 
> 

E.g. you have a large and nice standard style file. But then you simply 
want to show motorways on half transparent map:

[...] standard styles [...]
node::*, way::*, relation::* { opacity: eval(0.1 * prop(opacity)); }
way[highway=motorway] { opacity: 1; width: eval(1.4 * prop(width)); 
z-index: 100; }

(The example is a little artificial, but maybe you get the idea.)

>> What is
>>> way [highway]::
> '::' is just another specific subpart. I wrote that to make sure that no
> one things that:
> 
> way [highway]:: 
> overrides
> way [highway]::centerline
> 
> because (in my implementation) it does not.
> 
> This is all open to discussion of course.
> Sebastian

I implemented it a little different. The approach is described on the wiki:

http://wiki.openstreetmap.org/wiki/Talk:MapCSS/0.2

It took a view iterations, but I think it is now better than my initial 
draft.

What do you think?


Sebastian




More information about the Mapcss mailing list