Opened 8 years ago

Closed 8 years ago

#11592 closed enhancement (worksforme)

MapCSS function to show sequence number of member of relation. No idea if it would make sense for nodes of ways too.

Reported by: Polyglot Owned by: team
Priority: normal Milestone:
Component: Core mappaint Version:
Keywords: MapCSS Member index function Cc:


Public transport route relations contain stops in the correct order (ideally). Since JOSM started to sort them to the beginning and I've now started to follow suit (before I put the ways first, then the nodes, since that is how JOSM sorted them originally, and also because it's the ways I need to work on), it would be interesting if it were possible to have the ability to show a number using MapCSS representing the order they appear in the route relation.

Creating route relations seems more and more like a game of connect the dots, so being able to see which stop is the next in the sequence without having to scroll through the relation editor would enhance the workflow.

IndexInRelation(), or something of the kind?


Attachments (0)

Change History (5)

comment:1 Changed 8 years ago by Klumbumbus

Component: Internal mappaint styleCore mappaint

What if a stop node is part of several route relations? It would display several numbers!?

comment:2 Changed 8 years ago by Polyglot

True, that's a bit of a problem. What I usually do is mark the route relation I'm working on with an odbl=new tag. Then I use MapCSS to show its stops and its ways in fat purple and red. So I'm only interested in the route relation I'm working on, but I realise that this way of working is not very 'standard'. It does help "productivity" a lot to lift out 1 relation like that though.

It would probably not show several numbers anyway. I'm using MapCSS for the stops and it shows only 1 of the ref numbers if the node is a member of more than 1 relation.

I've been meaning to ask this so many times already, but apparently all those other times I did think it through a bit further and then refrained from asking.

So sorry for the noise.


Last edited 8 years ago by Polyglot (previous) (diff)

comment:3 Changed 8 years ago by simon04

Do we need a separate method for that? We already have index()

For instance,

node[public_transport=stop_position] < relation[type=route] {
  text: index(); /* the index in/of the matched parent/child object */

comment:4 Changed 8 years ago by simon04

In 8774/josm:

see #11592 - Add test case for MapCSS index() function

comment:5 Changed 8 years ago by simon04

Resolution: worksforme
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.