[josm-dev] MapCSS selector to match way in multiple relations

Jiri Klement jiri.klement at gmail.com
Thu Nov 3 07:56:56 GMT 2011


Hi,

I don't know about MapCSS but routes plugin can render hiking trails.
It was made especially for Czech hiking trails which AFAIK use the
same system as in Slovakia.

--
Jiri

On Thu, Nov 3, 2011 at 8:44 AM, Martin Ždila <m.zdila at gmail.com> wrote:
> 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/
>
> _______________________________________________
> josm-dev mailing list
> josm-dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/josm-dev
>



More information about the josm-dev mailing list