[Mapcss] Layered Node Symbols

Eric Wolf ebwolf at gmail.com
Wed Nov 30 18:43:26 GMT 2011


One other issue. If I use this:

  node[FCode=78006]::PostOffice{ icon-image: usgs/postoffice.png; z-index:
1; }
  node[Status=GAZ]::Background{ icon-image: square; icon-width: 28; color:
red; z-index: 2; }
  node[Status=EDIT]::Background{ icon-image: usgs/yellow28.png; z-index: 2;
}

The "icon-image: square" overrides the prior icon. In this example, if
Status=GAZ, then I get a solid red square. If Status=EDIT, I get my
postoffice.png layered on top of yellow28.png.

I'm going to get an instance of Potlatch setup on our server today so you
can test this out.

-Eric

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





On Wed, Nov 30, 2011 at 11:36 AM, Eric Wolf <ebwolf at gmail.com> wrote:

> Richard,
>
> It does work! I just had to delete all the spaces around the ::. I didn't
> bother to play around to see how much spacing is acceptable because I got
> it to work as I wanted. However, I am still having trouble getting an
> additional layer for selected nodes:
>
>   node[FCode=82024]::Library{ icon-image: usgs/library.png; z-index: 1; }
>   node[FCode=73002]::School{ icon-image: usgs/school.png; z-index: 1; }
>   node[FCode=78006]::PostOffice{ icon-image: usgs/postoffice.png; z-index:
> 1; }
>   node[Status=GAZ]::Background{ icon-image: usgs/red28.png; z-index: 2; }
>   node[Status=EDIT]::Background{ icon-image: usgs/yellow28.png; z-index:
> 2; }
>   node[Status=QC1]::Background { icon-image: usgs/green28.png; z-index: 2;
> }
>   node:selected::Select{ icon-image: usgs/cyan36.png; z-index: 3; }
>
> This gives leaves me with just my solid 36x36 cyan square for the selected
> node. The intent is to get a cyan border around the selected node. I also
> tried it without the "::Select" and with an "icon-image: square..." instead
> of the PNG file. Any hints on how to add a layer based on selection?
>
> I could probably figure it out in the code and I'll be getting back into
> the code this week. But I've been trying to work out the bugs with the new
> Potlatch2 so I can pass off developing our custom style(s) to our less
> technical people.
>
> -Eric
>
> -=--=---=----=----=---=--=-=--=---=----=---=--=-=-
> Eric B. Wolf                           720-334-7734
>
>
>
>
>
> On Wed, Nov 30, 2011 at 3:51 AM, Richard Fairhurst <richard at systemed.net>wrote:
>
>> Thomas Davie wrote:
>> > 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; }
>>
>> Yes, that should indeed work in P2. If it doesn't then point me to a
>> running instance of it and I can take a look.
>>
>> cheers
>> Richard
>>
>>
>>
>>
>> _______________________________________________
>> 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/20111130/25629aff/attachment.html>


More information about the Mapcss mailing list