[Mapcss] Layered Node Symbols
Eric Wolf
ebwolf at gmail.com
Tue Nov 29 23:32:12 GMT 2011
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.
Further:
node :selected { z-index: 1; icon-image: square; icon-width:
eval('_width+10'); color: cyan; interactive: no; }
Would give me a cyan "halo" around the icon when the node is selected for
editing.
I can't seem to get anything like this to work reliably with the MapCSS
Potach2. It seems that icon-image doesn't support z-index. I get the last
matching icon-image. The others are ignored. I can't see any way to add a
casing or any other "flair" to my icons.
One way I tried was to create separate .png files and construct the path
using eval:
node[FCode][Status] {
icon-image: eval("usgs/FCode".tag(FCode)."_".tag(Status).".png";
}
When load the style and have a Node in the current map with FCode=82024 and
Status=QC2, I expected the icon file usgs\FCode82024_QC2.png to be used.
But I just get a blank spot.
Any hints or suggestions?
-Eric
-=--=---=----=----=---=--=-=--=---=----=---=--=-=-
Eric B. Wolf 720-334-7734
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/mapcss/attachments/20111129/26d78dcd/attachment.html>
More information about the Mapcss
mailing list