[Mapcss] Multi-Value Condition

Paul Hartmann phaaurlt at googlemail.com
Mon Aug 1 17:09:38 BST 2011


Hi,

I'm suggesting to extend conditions to allow multiple values like it is
done in Osmarender. E.g.

  area[natural=marsh|wetland] {...}

as short-cut for

  area[natural=marsh],
  area[natural=wetland] {...}.

Adding some not so common tagging variants becomes cheaper. E.g. you can
extend

  way|z16-[highway=service][service=parking_aisle] {...}

to

  way|z16-[highway=service][service=parking_aisle|drive-through] {...}

with minimal effort.

Using "|" notation does not entirely solve the problem of complex
logical expressions in MapCSS ('set' command could be the answer in
these situations). But in most practical cases, it should help to avoid
bulky condition cascades as, for example, in [1].

Paul


PS: I thought, I've seen this notation in Kothic or Ceyx somewhere, but
couldn't find it right now.

[1]

way|z13-15[highway=proposed][construction=residential],
way|z13-15[highway=proposed][construction=unclassified],
way|z13-15[highway=proposed][construction=living_street],
way|z13-15[highway=proposed][construction=service],
way|z13-15[highway=construction][construction=residential],
way|z13-15[highway=construction][construction=unclassified],
way|z13-15[highway=construction][construction=living_street],
way|z13-15[highway=construction][construction=service] {
    color: #aaaaaa;
    width: 4;
}

becomes

way|z13-15[highway=proposed|construction]
[construction=residential|unclassified|living_street|service] {
    color: #aaaaaa;
    width: 4;
}



More information about the Mapcss mailing list