[Mapcss] eval and set

Sebastian Spaeth Sebastian at SSpaeth.de
Tue Jul 13 16:27:14 BST 2010


Hi all, this is my current z16 rendering (4096x4096 png) and I kind of
like it: http://sspaeth.de/uploads/tmp/map16.png

So far so good. Now, I get to the difficult stuff. E.g. when I have
bridge=yes I need to at "1" to the z-index. (or add tag layer if it
exists). My best bet is eval() so I need to start implementing that now
:-).

This is the example:
{ opacity: eval('population/100000'); }

1) How do we know that population is a tag name and not some string? Do we
need something like "tag(population)" or "value(population)" to make
clear what we want? 

2) Then, how are evals supposed to stack?

way [highway]{ z-index: eval('layer'); }
way .bridge  { z-index: eval('z-index+1'); }

What would that do to our ways? Do we only evaluate the "final" eval, so
the above is:
    way { z-index: eval('z-index+1'); }

or do we eval as we go, and the final is
    z-index: ((layer) + 1)

The last is probably hell to implement, but the easiest way to make
bridges work :-).

3) And lastly, are evals of the form width: eval('width+5') with the left
hand ocurring in the eval expression supposed to work at all?

Sebastian




More information about the Mapcss mailing list