[Mapcss] Layered Node Symbols
Thomas Davie
tom.davie at gmail.com
Wed Nov 30 00:13:01 GMT 2011
On 29 Nov 2011, at 23:32, Eric Wolf wrote:
> Prior to Potlatch 2.3, I was able to use z-index to display a node with an icon based on one tag and a background based on another tag. For instance:
>
> node[FCode=73002] { icon-image: usgs/school.png; z-index: 20; }
> node[Status=GAZ]{ icon-image: usgs/red28.png; z-index: 19; }
> node[Status=EDIT]{ icon-image: usgs/yellow28.png; z-index: 19; }
> node[Status=QC1] { icon-image: usgs/green28.png; z-index: 19; }
>
> Would yield my school.png icon with either a red, yellow or green "halo" depending on the value of the "Status" tag.
As far as my understanding of MapCSS goes this sounds like a bug in earlier versions of Potlatch – the way this should work is that the later icon-image should overrule the earlier one, as should the later z-index.
> Any hints or suggestions?
I'm not sure that Potlatch supports this, because it's a MapCSS extension, but some renderers support layer identifiers. This allows you to extend the selector by specifying a "layer" after selecting the node, your above example would look something like this:
node[FCode=73002]::School { icon-image: usgs/school.png; z-index: 20; }
node[Status=GAZ]::Background { icon-image: usgs/red28.png; z-index: 19; }
node[Status=EDIT]::Background { icon-image: usgs/yellow28.png; z-index: 19; }
node[Status=QC1]::Background { icon-image: usgs/green28.png; z-index: 19; }
Thanks
Tom Davie
More information about the Mapcss
mailing list