[Mapcss] Mapcss clarifications
Sebastian Spaeth
Sebastian at SSpaeth.de
Mon Jul 5 08:55:25 BST 2010
Before I start fudging the wiki, I'd like to have some clarifications on
mapcss, which might or might not have been discussed.
I take my infos from here: http://wiki.openstreetmap.org/wiki/MapCSS, right?
1) How are comments defined?
- /* comment here (which can span multiple lines? */
- # at start of line as comment? or also as :
way {color:red;} #FOO boo here
- // type of comments?
So far I went for the first solution, but what do others prefer? And
that should be documented in the wiki. Should all three work?
2) How are nodes supposed to be rendered?
- All the wiki page says about nodes/points, is "icon-image"
Would a "width" argument on a node render a circle, with a casing
argument render a border on that circle? Or are we restricted to
icon images here? We'll often want to use icons, but being able to
easily provide simple circle types with additional labeling would be
nice. I know, implementation details are left to the renderer, but
it would be good to propose how those values could be used.
3) How is "fill-image" supposed to work on an area?
Scale image and fill it, clipping the borders? Repeat as pattern? We
probably want to borrow more CSS terms here to specify that
behavior, right?
4) How are color names defined? Is there a CSS set of color names/values
that we can use, or do we have our own set? I snatched the color
names from the python imaging library for now which provides 140
names.
5) What selector operators should we support? All I do now is ! < = > plus
existence tests: way [highway].
Is "way .highway" supposed to be identical to way [highway]? Also I
used the '!' to negate all filters, so both forms work:
- way [!highway] (does not have a highway tag at all)
- way [!name=route66]
Looking at your code, I see operators such as 'ne' and 'regex', can
we list some of the basic supported operators that are supposed to
work?
Also, how do you separate left hand, operator and right hand What
happens with spaces in left hand or right hand? Take these:
["high way" ne "Route 66"]
[name eq NE Ave] (invalid?)
[name = "bob said 'Hello \"Mom\". regex are cool'"]
I know these are corner cases that look a bit constructed, but
e.g. the spaces in tags/values problem is real at least.
6) From the spec, I did not get what this means:
@import url("osmtags.css") osmtags;
What happens here? All styles in osmtags.css only apply to elements
with a 'class' osmtags? So osm data with osmtags="foo" would get it
applied? I'm a bit unsure here.
7) What with declarations. I parse my style sheets once and pass the
result to a renderer, what if I render 2 things at different
levels. Would a { set tag=value; } remain persistent between runs? I
presume not.
8) Rules are supposed to be applied in file order? Or in other words, is
this supposed to render my horsepaths blue?
way [highway] {color:blue;}
way .horsepath { set highway=unclassified;}
There are more questions where those came from :-).
spaetz
-------------- 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/20100705/15a81bae/attachment.pgp>
More information about the Mapcss
mailing list