[Mapcss] [Proposal] Use "area" pseudo-object rather than way:closed construct; generally, be less OSM-centric

Richard Fairhurst richard at systemeD.net
Tue Jul 20 14:26:48 BST 2010


Chris Browet wrote:

> For 0.2, I'd suggest already adding an "area" pseudo-object rather than the
> very OSM-esque way:closed.

Further to Frederik's mail, this would be an excellent plan when/if we  
get an area primitive in OSM.

As it stands, however, there's a good reason to have 'way :area' - you  
only have to write each selector once, rather than doubling it up for  
the roundabout (closed highway) case. So currently you can write:
      way[highway=primary] { color: red; }

whereas if MapCSS had an area type but OSM didn't, you'd have to write:
      way[highway=primary], area[highway=primary] { color: red; }

for every single rule... which would be a pain in the nuts.

(Having recently had to face a similar dilemma with P2's presets I'm  
coming round to the idea of having an area primitive in OSM 0.7.)

cheers
Richard





More information about the Mapcss mailing list