[OSM-talk] Halcyon/MapCSS question
Richard Fairhurst
richard at systemeD.net
Wed Dec 2 10:58:10 GMT 2009
Steve Bennett wrote:
> Next question: when and why do you need to add :area to be able to tag areas?
> way[landuse=commercial] { fill-color: purple; }
>
> worked. But this:
> way[building=yes] { fill-color: black; }
>
> didn't. And this:
> way:area[building=yes] { fill-color: black; }
>
> Did. ?
You shouldn't need to add :area for it to render. :area just means
"only use this rule if the way is closed" (i.e. start and end points
are the same).
So you might do:
way [highway] [!junction] :area { fill-color: grey; }
which would mean "fill it in grey if it's a highway area, unless the
junction tag is set". (Because you don't want roundabouts to be filled!)
If there's somewhere where this, or anything, isn't working as it
should, throw me the lat/lon and I'll take a look. potlatch-dev@
mailing list is probably best for this to avoid boring the good
readers of talk at . :)
> And finally, I have these rules:
> ----
> way[landuse=commercial] { fill-color: purple;fill-opacity:0.5;z-index:1;}
> way:area[building=yes] { fill-color:orange; z-index:4;}
> ----
>
> Now, some buildings are getting rendered on top of the commercial
> areas (and coming out bright orange), and some of them are being
> rendered beneath the commercial areas (and coming out a dark red
> colour). Bug?
Seems odd. Again, throw me a lat/lon and I can take a closer look.
> Also, what's the difference between "z-index: 0;" and not specifying
> z-index at all?
The default is currently 5 - i.e. halfway through the 0 to 10
permitted range. It's likely that it'll move to 0 and the permitted
range become -10 to 10 in a future version.
cheers
Richard
More information about the talk
mailing list