[josm-dev] MapCSS selector to match way in multiple relations
Martin Ždila
m.zdila at gmail.com
Thu Nov 3 07:44:09 GMT 2011
Hello
I'd like to create a MapCSS for hiking trails. In our country we use 4
colours to mark hiking trails. Some ways may be parts of multiple
trails. What I want is to draw parallel lines to such ways but not
with fixed offset for each color.
I found that offset style must be an absolute value and so I need to
specify offset for all color combinations like this:
relation[osmc:symbol^=red] > way::redLayer { color: red; offset: 5 }
relation[osmc:symbol^=green] > way::greenLayer { color: green; offset: 5 }
relation[osmc:symbol^=blue] > way::blueLayer { color: blue; offset: 5 }
relation[osmc:symbol^=yellow] > way::yellowLayer { color: yellow; offset: 5 }
/* Following rules should override previous per layer: */
/* Following uses unsupported syntax: */
relation[osmc:symbol^=red & osmc:symbol^=green ] > way::greenLayer {
offset: 10 }
relation[osmc:symbol^=red & osmc:symbol^=blue ] > way::greenBlue { offset: 10 }
relation[osmc:symbol^=red & osmc:symbol^=yellow ] > way::greenYellow {
offset: 10 }
... and many other combinations
Is there a way to write it in some supported syntax? Or is there some
different way to render marked trails as I described?
Thanks in advance.
--
Ing. Martin Ždila
tel:+421-908-363-848
mailto:martin at zdila.sk
http://www.zdila.sk/
More information about the josm-dev
mailing list