[Mapcss] Layered Node Symbols

Eric Wolf ebwolf at gmail.com
Wed Nov 30 00:27:10 GMT 2011


Unfortunately the layers don't seem to be supported in Potlatch yet. I
guess my alternative is to do something like this:

node[FCode=73002][Status=GAZ] { icon-image: usgs/school_GAZ.png; }
node[FCode=73002][Status=EDIT] { icon-image: usgs/school_EDIT.png; }
node[FCode=73002][Status=QC1] { icon-image: usgs/school_QC1.png; }

And build the background into the PNG image.

Thanks,
-Eric

-=--=---=----=----=---=--=-=--=---=----=---=--=-=-
Eric B. Wolf                           720-334-7734





On Tue, Nov 29, 2011 at 5:13 PM, Thomas Davie <tom.davie at gmail.com> wrote:

> 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
> _______________________________________________
> Mapcss mailing list
> Mapcss at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/mapcss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/mapcss/attachments/20111129/aec971dd/attachment.html>


More information about the Mapcss mailing list