Modify ↓
#10299 closed enhancement (fixed)
MapCSS index for last element of object
Reported by: | emmexx | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 15.04 |
Component: | Core mappaint | Version: | tested |
Keywords: | mapcss | Cc: | lists@…, Klumbumbus |
Description
I'd like to create a style where the first node of a highway is red and the last is green.
For the 1st one I used index as in
way[highway] >[index=1] node
But I couldn't find anything about the last element. There's no "last" keyword or pseudo-class in the docs. I tried with eval(count()) but I don't know how to use it in the selector.
Is there a way to accomplish that?
Thank you
maxx
Attachments (0)
Change History (8)
comment:1 by , 11 years ago
comment:2 by , 10 years ago
Cc: | added |
---|
comment:3 by , 10 years ago
Cc: | added |
---|
comment:5 by , 10 years ago
Keywords: | mapcss added |
---|---|
Milestone: | → 15.04 |
Note:
See TracTickets
for help on using tickets.
Not possible at the moment. Suggested syntax: negative numbers count from last to first, so the last node would be
way[highway] >[index=-1] node
.