#14098 closed enhancement (worksforme)
Josm mapcss, own style and visualisation
Reported by: | Allroads | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | External mappaint style | Version: | |
Keywords: | mapcss | Cc: |
Description
https://help.openstreetmap.org/questions/53267/josm-mapcss-two-icons-next-to-each-other-possible
copy of this page:
Version 10966, not the latest because a plugin do not work with this latest.
I want two icons next to each other or partly over each other. Icons are 30x30px.
Tags placed on the same node. wpt=yes fee=no
This in the mapcss.
node|z14-[wpt=yes] { icon-offset-x:0;
icon-offset-y:0; icon-image: "wptn.png"; }
node|z14-[wpt=yes] { icon-offset-x:30;
icon-offset-y:0; icon-image: "feen.png"; }
Just a example for tags.
I do not want to make feen.png 60x30 px and leave one half transparent. I did see the trafficsign finish mapcss example.
I want the fee icon(30x30) next to wpt icon(30x30).
If you have icon-offset-x set on both, it uses the last one in the table to set both icons off. They stay always over each other, I think.
Edit: When one node and two icons, 1 appears, the last one writing in line on the mapcss file. I want to see them both.
The same problem with text 1 node with multiple tags, from two tags I want to see the value's. 1 tag, I want the value number above the node. 1 tag, I want the value under the node. when using
- text-offset-x: -30; text-offset-y: 10;
- text-offset-x: -30; text-offset-y: -10;
for two tags on the same node.
Here also the last one in the table, appears.
What am I doing wrong. Or is it a bug?
Attachments (0)
Change History (6)
comment:3 by , 8 years ago
Resolution: | fixed → worksforme |
---|
comment:4 by , 8 years ago
As non nativ english, I saw this page with, MapCSSImplementation#LayerIdentifier, before I openend this ticket.
I could not visualize this text as a solution for my problem.
comment:6 by , 8 years ago
Replying to Klumbumbus:
I added one more example. I hope this makes it more clear.
Yes, before, after you mentioned it here with your example, I tried it myself to figure it out, see what i get, then I understand it. But with example pic in the info it is more clear. The visualisation. Maybe, I got it the first time.
Hope others benefit from it.
This is a common difficulty, there is much more possible, but plain text does not always express enough, what is possible.
Thanks for your effort.
With your second rule you overwrite your first rule.
When you want to display multiple icons or texts you need to use layers. See the docu at Help/Styles/MapCSSImplementation#LayerIdentifier
Code could be: