Re: [OSM-talk] Halcyon/MapCSS question
On Fri, Dec 4, 2009 at 1:10 AM, Martin Koppenhoefer wrote: > 2009/12/2 Richard Fairhurst > > 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!) >> > > AFAIK all highways require the area=yes-Tag to be set in order to be > defined as an area, because there are other circular ways that are not > roundabouts or junctions but still aren't areas. I wouldn't want those to be > split just because otherwise they would be recognized as areas. > I assume that way [highway]:area { ... } is different from way [highway][area=yes] { ... } The first only matches ways that are closed polygons (with the exact same starting and end node) and the second matches those that have the area=yes tag. ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Halcyon/MapCSS question
2009/12/2 Richard Fairhurst > > 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!) > AFAIK all highways require the area=yes-Tag to be set in order to be defined as an area, because there are other circular ways that are not roundabouts or junctions but still aren't areas. I wouldn't want those to be split just because otherwise they would be recognized as areas. cheers, Martin ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Halcyon/MapCSS question
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 t...@. :) > 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 ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Halcyon/MapCSS question
On Wed, Dec 2, 2009 at 9:10 PM, Richard Fairhurst wrote: > > Steve Bennett wrote: > > How do you make a style that depends on two attributes? Eg, > > highway=residential *and* cycleway=lane? > > Simply: > > way[highway=residential][cycleway=lane] { ...} > Thanks, I tried every combination but that one. :) 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. ? 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? Steve ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Halcyon/MapCSS question
Steve Bennett wrote: > How do you make a style that depends on two attributes? Eg, > highway=residential *and* cycleway=lane? Simply: way[highway=residential][cycleway=lane] { ...} cheers Richard -- View this message in context: http://old.nabble.com/Halcyon-MapCSS-question-tp26603722p26606394.html Sent from the OpenStreetMap - General mailing list archive at Nabble.com. ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Halcyon/MapCSS question
Also, what's the difference between "z-index: 0;" and not specifying z-index at all? I ask, because I tested it on the lake at about -37.845, 144.97. By default, the water is green, and the islands in the lake are dark green. If I add "way[natural=water] { fill-color: blue; }", the water is dark blue, and the islands are even darker blue. If I add "way[natural=water] { fill-color: blue; z-index:0;}, the water is bright blue, and the islands are invisible. Steve ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
[OSM-talk] Halcyon/MapCSS question
How do you make a style that depends on two attributes? Eg, highway=residential *and* cycleway=lane? I know that this works: way[highway=residentia] { ... } way[cycleway=lane] { ... } And the two will be combined, if that makes sense. But how do you make the style depend on that specific combination? Steve ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk